<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Chapter3 生物信息学 | 小蓝哥的知识荒原</title>
<meta name="author" content="李详">
<!-- JS --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.2"></script><script src="https://kit.fontawesome.com/6ecbd6c532.js" crossorigin="anonymous"></script><script src="libs/header-attrs-2.9/header-attrs.js"></script><script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="libs/bootstrap-4.6.0/bootstrap.min.css" rel="stylesheet">
<script src="libs/bootstrap-4.6.0/bootstrap.bundle.min.js"></script><script src="libs/bs3compat-0.2.5.1/tabs.js"></script><script src="libs/bs3compat-0.2.5.1/bs3compat.js"></script><link href="libs/bs4_book-1.0.0/bs4_book.css" rel="stylesheet">
<script src="libs/bs4_book-1.0.0/bs4_book.js"></script><script src="https://cdn.jsdelivr.net/autocomplete.js/0/autocomplete.jquery.min.js"></script><script src="https://cdn.jsdelivr.net/npm/mark.js@8.11.1/dist/mark.min.js"></script><!-- CSS -->
</head>
<body data-spy="scroll" data-target="#toc">

<div class="container-fluid">
<div class="row">
  <header class="col-sm-12 col-lg-3 sidebar sidebar-book"><a class="sr-only sr-only-focusable" href="#content">Skip to main content</a>

    <div class="d-flex align-items-start justify-content-between">
      <h1>
        <a href="index.html" title="">小蓝哥的知识荒原</a>
      </h1>
      <button class="btn btn-outline-primary d-lg-none ml-2 mt-1" type="button" data-toggle="collapse" data-target="#main-nav" aria-expanded="true" aria-controls="main-nav"><i class="fas fa-bars"></i><span class="sr-only">Show table of contents</span></button>
    </div>

    <div id="main-nav" class="collapse-lg">
      <form role="search">
        <input id="search" class="form-control" type="search" placeholder="Search" aria-label="Search">
</form>

      <nav aria-label="Table of contents"><h2>Table of contents</h2>
        <ul class="book-toc list-unstyled">
<li><a class="" href="index.html">简介</a></li>
<li><a class="" href="r.html"><span class="header-section-number">1</span> R语言知识汇总</a></li>
<li><a class="" href="python.html"><span class="header-section-number">2</span> Python知识汇总</a></li>
<li><a class="active" href="bioinf.html"><span class="header-section-number">3</span> 生物信息学</a></li>
<li><a class="" href="literature.html"><span class="header-section-number">4</span> 嗑盐文献</a></li>
<li><a class="" href="article.html"><span class="header-section-number">5</span> 嗑盐文章</a></li>
<li><a class="" href="%E4%B8%8A%E8%AF%BE%E7%AC%94%E8%AE%B0.html"><span class="header-section-number">6</span> 上课笔记</a></li>
<li><a class="" href="other.html"><span class="header-section-number">7</span> Other</a></li>
<li><a class="" href="references.html">References</a></li>
</ul>

        <div class="book-extra">
          <p><a id="book-repo" href="https://github.com/lixiang117423/lixiang117423.github.io">View book source <i class="fab fa-github"></i></a></p>
        </div>
      </nav>
</div>
  </header><main class="col-sm-12 col-md-9 col-lg-7" id="content"><div id="bioinf" class="section level1" number="3">
<h1>
<span class="header-section-number">Chapter3</span> 生物信息学<a class="anchor" aria-label="anchor" href="#bioinf"><i class="fas fa-link"></i></a>
</h1>
<div id="本章前言-2" class="section level2" number="3.1">
<h2>
<span class="header-section-number">3.1</span> 本章前言<a class="anchor" aria-label="anchor" href="#%E6%9C%AC%E7%AB%A0%E5%89%8D%E8%A8%80-2"><i class="fas fa-link"></i></a>
</h2>
<p>本章主要是关于生物信息学的相关知识。</p>
</div>
<div id="常用的生物学数据库" class="section level2" number="3.2">
<h2>
<span class="header-section-number">3.2</span> 常用的生物学数据库<a class="anchor" aria-label="anchor" href="#%E5%B8%B8%E7%94%A8%E7%9A%84%E7%94%9F%E7%89%A9%E5%AD%A6%E6%95%B0%E6%8D%AE%E5%BA%93"><i class="fas fa-link"></i></a>
</h2>
<div id="cath-gene3d" class="section level3" number="3.2.1">
<h3>
<span class="header-section-number">3.2.1</span> CATH-Gene3D<a class="anchor" aria-label="anchor" href="#cath-gene3d"><i class="fas fa-link"></i></a>
</h3>
<p>这个数据库是蛋白质数据库，主要是蛋白结构域的进化关系。</p>
<p><a href="https://www.cathdb.info/">点击访问</a>。</p>
</div>
</div>
<div id="WSL4Docker" class="section level2" number="3.3">
<h2>
<span class="header-section-number">3.3</span> <code>WSL</code>安装使用<code>Docker</code><a class="anchor" aria-label="anchor" href="#WSL4Docker"><i class="fas fa-link"></i></a>
</h2>
<div id="docker的安装" class="section level3" number="3.3.1">
<h3>
<span class="header-section-number">3.3.1</span> <code>Docker</code>的安装<a class="anchor" aria-label="anchor" href="#docker%E7%9A%84%E5%AE%89%E8%A3%85"><i class="fas fa-link"></i></a>
</h3>
<p>参考的安装教程：<a href="https://yeasy.gitbook.io/docker_practice/install/ubuntu">Docker-从入门到实践</a>。关键的代码如下：</p>
<div class="sourceCode" id="cb18"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb18-1"><a href="bioinf.html#cb18-1" aria-hidden="true" tabindex="-1"></a>curl <span class="sc">-</span>fsSL test.docker.com <span class="sc">-</span>o get<span class="sc">-</span>docker.sh</span>
<span id="cb18-2"><a href="bioinf.html#cb18-2" aria-hidden="true" tabindex="-1"></a>curl <span class="sc">-</span>fsSL get.docker.com <span class="sc">-</span>o get<span class="sc">-</span>docker.sh</span>
<span id="cb18-3"><a href="bioinf.html#cb18-3" aria-hidden="true" tabindex="-1"></a>sudo sh get<span class="sc">-</span>docker.sh <span class="sc">--</span>mirror Aliyun</span>
<span id="cb18-4"><a href="bioinf.html#cb18-4" aria-hidden="true" tabindex="-1"></a>sudo sh get<span class="sc">-</span>docker.sh <span class="sc">--</span>mirror AzureChinaCloud</span></code></pre></div>
</div>
<div id="docker的使用" class="section level3" number="3.3.2">
<h3>
<span class="header-section-number">3.3.2</span> <code>Docker</code>的使用<a class="anchor" aria-label="anchor" href="#docker%E7%9A%84%E4%BD%BF%E7%94%A8"><i class="fas fa-link"></i></a>
</h3>
<p><code>Docker</code>默认是需要<code>root</code>用户才能使用的，在<code>Windows上</code>我习惯于进入<code>Powershell</code>后执行下面的命令启动<code>Docker</code>：</p>
<div class="sourceCode" id="cb19"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb19-1"><a href="bioinf.html#cb19-1" aria-hidden="true" tabindex="-1"></a>wsl <span class="sc">--</span>shutdown <span class="co"># 先关闭wsl</span></span>
<span id="cb19-2"><a href="bioinf.html#cb19-2" aria-hidden="true" tabindex="-1"></a>wsl <span class="co"># 启动WSL</span></span>
<span id="cb19-3"><a href="bioinf.html#cb19-3" aria-hidden="true" tabindex="-1"></a>sudo su <span class="co"># 进入root</span></span>
<span id="cb19-4"><a href="bioinf.html#cb19-4" aria-hidden="true" tabindex="-1"></a>sudo service docker start <span class="co"># 启动Docker</span></span>
<span id="cb19-5"><a href="bioinf.html#cb19-5" aria-hidden="true" tabindex="-1"></a>su xiang <span class="co"># 切换会用户（非root权限）</span></span></code></pre></div>
</div>
<div id="如何从wsl1切换到wsl2" class="section level3" number="3.3.3">
<h3>
<span class="header-section-number">3.3.3</span> 如何从<code>WSL1</code>切换到<code>WSL2</code><a class="anchor" aria-label="anchor" href="#%E5%A6%82%E4%BD%95%E4%BB%8Ewsl1%E5%88%87%E6%8D%A2%E5%88%B0wsl2"><i class="fas fa-link"></i></a>
</h3>
<p>我在<code>Windows</code>上使用<code>Docker</code>遇到的一个很奇怪的问题是，我之前的版本是<code>WSL1</code>,<code>Docker</code>无论如何都无法使用，搜索半天也没有找到解决方法，索性将<code>WSL1</code>升级成<code>WSL2</code>，没想到问题就那样解决了。参考教程：<a href="https://zhuanlan.zhihu.com/p/356397851">知乎：WSL1 升级为WSL2</a>。下面是升级的过程：</p>
<ul>
<li><p>下载对应的内核更新包：<a href="https://link.zhihu.com/?target=https%3A//wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi">点击下载</a></p></li>
<li><p><code>CMD</code>中管理员身份运行代码：</p></li>
</ul>
<div class="sourceCode" id="cb20"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">dism.exe</span> <span class="op">/</span><span class="va">online</span> <span class="op">/</span><span class="va">enable</span><span class="op">-</span><span class="va">feature</span> <span class="op">/</span><span class="va">featurename</span><span class="op">:</span><span class="va">VirtualMachinePlatform</span> <span class="op">/</span><span class="va">all</span> <span class="op">/</span><span class="va">norestart</span></code></pre></div>
<ul>
<li>设置版本</li>
</ul>
<div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb21-1"><a href="bioinf.html#cb21-1" aria-hidden="true" tabindex="-1"></a>wsl <span class="sc">--</span>set<span class="sc">-</span>version Ubuntu<span class="fl">-20.04</span> <span class="dv">2</span></span></code></pre></div>
<p>其中的<code>Ubuntu-20.04</code>是通过代码<code>wsl -l -v</code>查看到的。</p>
<p>然后再次重启<code>WSL</code>即可。</p>
</div>
<div id="下载docker镜像" class="section level3" number="3.3.4">
<h3>
<span class="header-section-number">3.3.4</span> 下载<code>Docker</code>镜像<a class="anchor" aria-label="anchor" href="#%E4%B8%8B%E8%BD%BDdocker%E9%95%9C%E5%83%8F"><i class="fas fa-link"></i></a>
</h3>
<p>在<a href="https://hub.docker.com/">Docker Hub</a>中检索下载需要的镜像。</p>
</div>
<div id="docker的使用-1" class="section level3" number="3.3.5">
<h3>
<span class="header-section-number">3.3.5</span> <code>Docker</code>的使用<a class="anchor" aria-label="anchor" href="#docker%E7%9A%84%E4%BD%BF%E7%94%A8-1"><i class="fas fa-link"></i></a>
</h3>
<p>进入<code>WSL</code>后运行下方代码运行<code>Docker</code>：</p>
<div class="sourceCode" id="cb22"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb22-1"><a href="bioinf.html#cb22-1" aria-hidden="true" tabindex="-1"></a>sudo service <span class="sc">--</span>status<span class="sc">-</span>all </span>
<span id="cb22-2"><a href="bioinf.html#cb22-2" aria-hidden="true" tabindex="-1"></a>sudo service docker start</span>
<span id="cb22-3"><a href="bioinf.html#cb22-3" aria-hidden="true" tabindex="-1"></a>sudo service docker start</span>
<span id="cb22-4"><a href="bioinf.html#cb22-4" aria-hidden="true" tabindex="-1"></a>docker run <span class="sc">-</span>v <span class="sc">/</span>mnt<span class="sc">/</span><span class="er">:/</span>work <span class="sc">-</span>it omicsclass<span class="sc">/</span>rnaseq</span></code></pre></div>
<p>其中的<code>work</code>是不一定的，需要看镜像给的路径是啥。</p>
</div>
<div id="如何创建自己的镜像" class="section level3" number="3.3.6">
<h3>
<span class="header-section-number">3.3.6</span> 如何创建自己的镜像<a class="anchor" aria-label="anchor" href="#%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E9%95%9C%E5%83%8F"><i class="fas fa-link"></i></a>
</h3>
<p>先从<a href="https://hub.docker.com/">Docker Hub</a>下载<code>Ubuntu</code>的官方镜像，然后在镜像中安装需要的软件。
PS：如何加速<code>pip</code>的下载：</p>
<div class="sourceCode" id="cb23"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb23-1"><a href="bioinf.html#cb23-1" aria-hidden="true" tabindex="-1"></a>pip install django <span class="sc">-</span>i https<span class="sc">:</span><span class="er">//</span>pypi.tuna.tsinghua.edu.cn<span class="sc">/</span>simple</span></code></pre></div>
<p>加速的<code>R</code>包的下载安装：</p>
<div class="sourceCode" id="cb24"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/base/options.html">options</a></span><span class="op">(</span>repos<span class="op">=</span><span class="fu"><a href="https://rdrr.io/r/base/structure.html">structure</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span>CRAN<span class="op">=</span><span class="st">"https://mirrors.tuna.tsinghua.edu.cn/CRAN/"</span><span class="op">)</span><span class="op">)</span><span class="op">)</span>
<span class="fu"><a href="https://rdrr.io/r/base/options.html">options</a></span><span class="op">(</span>BioC_mirror<span class="op">=</span><span class="st">"https://mirrors.tuna.tsinghua.edu.cn/bioconductor"</span><span class="op">)</span></code></pre></div>
<p>在安装完成需要的软件后，先运行<code>exit</code>退出<code>Docker</code>，然后运行下面的代码生成新的镜像：</p>
<div class="sourceCode" id="cb25"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb25-1"><a href="bioinf.html#cb25-1" aria-hidden="true" tabindex="-1"></a>docker commit <span class="sc">-</span>m <span class="st">" add some softwares for RNA-Seq"</span> <span class="sc">-</span>a <span class="st">"xiangli"</span> 21bfa810c811 lixiang117423<span class="sc">/</span>rnaseq<span class="sc">:</span>v1</span></code></pre></div>
<p>然后登陆自己的<code>Docker</code>，登录以后把新的镜像推送到<code>Docker Hub</code>即可：</p>
<div class="sourceCode" id="cb26"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb26-1"><a href="bioinf.html#cb26-1" aria-hidden="true" tabindex="-1"></a>docker push lixiang117423<span class="sc">/</span>rnaseq<span class="sc">:</span>v1</span></code></pre></div>
</div>
</div>
<div id="conda的安装使用" class="section level2" number="3.4">
<h2>
<span class="header-section-number">3.4</span> <code>Conda</code>的安装使用<a class="anchor" aria-label="anchor" href="#conda%E7%9A%84%E5%AE%89%E8%A3%85%E4%BD%BF%E7%94%A8"><i class="fas fa-link"></i></a>
</h2>
<div id="下载安装" class="section level3" number="3.4.1">
<h3>
<span class="header-section-number">3.4.1</span> 下载安装<a class="anchor" aria-label="anchor" href="#%E4%B8%8B%E8%BD%BD%E5%AE%89%E8%A3%85"><i class="fas fa-link"></i></a>
</h3>
<p>现在<a href="https://docs.conda.io/projects/conda/en/latest/user-guide/install/download.html">官方网站</a>下载对应版本的<code>.sh</code>文件。然后一路默认安装即可。安装完成后激活用户目录下的<code>.bashrc</code>文件即可。</p>
</div>
<div id="conda安装r及r包" class="section level3" number="3.4.2">
<h3>
<span class="header-section-number">3.4.2</span> <code>Conda</code>安装<code>R</code>及<code>R</code>包<a class="anchor" aria-label="anchor" href="#conda%E5%AE%89%E8%A3%85r%E5%8F%8Ar%E5%8C%85"><i class="fas fa-link"></i></a>
</h3>
<div class="sourceCode" id="cb27"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb27-1"><a href="bioinf.html#cb27-1" aria-hidden="true" tabindex="-1"></a>conda instll r<span class="sc">-</span>base</span>
<span id="cb27-2"><a href="bioinf.html#cb27-2" aria-hidden="true" tabindex="-1"></a>conda instll r<span class="sc">-</span>ggplot2</span>
<span id="cb27-3"><a href="bioinf.html#cb27-3" aria-hidden="true" tabindex="-1"></a>conda install <span class="sc">-</span>c bioconda bioconductor<span class="sc">-</span>deseq2</span></code></pre></div>
</div>
<div id="安装其他软件" class="section level3" number="3.4.3">
<h3>
<span class="header-section-number">3.4.3</span> 安装其他软件<a class="anchor" aria-label="anchor" href="#%E5%AE%89%E8%A3%85%E5%85%B6%E4%BB%96%E8%BD%AF%E4%BB%B6"><i class="fas fa-link"></i></a>
</h3>
<p>其他软件的安装直接去<a href="https://anaconda.org/gallery">Conda Gallery</a>上检索进行安装。</p>
</div>
<div id="pip下载速度慢的解决方法" class="section level3" number="3.4.4">
<h3>
<span class="header-section-number">3.4.4</span> <code>pip</code>下载速度慢的解决方法：<a class="anchor" aria-label="anchor" href="#pip%E4%B8%8B%E8%BD%BD%E9%80%9F%E5%BA%A6%E6%85%A2%E7%9A%84%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%95"><i class="fas fa-link"></i></a>
</h3>
<div class="sourceCode" id="cb28"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb28-1"><a href="bioinf.html#cb28-1" aria-hidden="true" tabindex="-1"></a>pip install django <span class="sc">-</span>i https<span class="sc">:</span><span class="er">//</span>pypi.tuna.tsinghua.edu.cn<span class="sc">/</span>simple</span></code></pre></div>
</div>
</div>
<div id="git的使用" class="section level2" number="3.5">
<h2>
<span class="header-section-number">3.5</span> git的使用<a class="anchor" aria-label="anchor" href="#git%E7%9A%84%E4%BD%BF%E7%94%A8"><i class="fas fa-link"></i></a>
</h2>
<div id="git同时管理github与gitee" class="section level3" number="3.5.1">
<h3>
<span class="header-section-number">3.5.1</span> git同时管理GitHub与Gitee<a class="anchor" aria-label="anchor" href="#git%E5%90%8C%E6%97%B6%E7%AE%A1%E7%90%86github%E4%B8%8Egitee"><i class="fas fa-link"></i></a>
</h3>
<div class="sourceCode" id="cb29"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb29-1"><a href="bioinf.html#cb29-1" aria-hidden="true" tabindex="-1"></a><span class="fl">1.</span> 查看远程仓库地址</span>
<span id="cb29-2"><a href="bioinf.html#cb29-2" aria-hidden="true" tabindex="-1"></a>git remote <span class="sc">-</span>v</span>
<span id="cb29-3"><a href="bioinf.html#cb29-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb29-4"><a href="bioinf.html#cb29-4" aria-hidden="true" tabindex="-1"></a><span class="fl">2.</span> 重命名远程仓库</span>
<span id="cb29-5"><a href="bioinf.html#cb29-5" aria-hidden="true" tabindex="-1"></a>git remote rename origin github</span>
<span id="cb29-6"><a href="bioinf.html#cb29-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb29-7"><a href="bioinf.html#cb29-7" aria-hidden="true" tabindex="-1"></a><span class="fl">3.</span> 添加新的远程仓库</span>
<span id="cb29-8"><a href="bioinf.html#cb29-8" aria-hidden="true" tabindex="-1"></a>git remote add gitee https<span class="sc">:</span><span class="er">//</span>gitee.com<span class="sc">/</span>gozhuyinglong<span class="sc">/</span>blog<span class="sc">-</span>demos.git</span>
<span id="cb29-9"><a href="bioinf.html#cb29-9" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb29-10"><a href="bioinf.html#cb29-10" aria-hidden="true" tabindex="-1"></a><span class="fl">4.</span> 多个远程仓库推拉</span>
<span id="cb29-11"><a href="bioinf.html#cb29-11" aria-hidden="true" tabindex="-1"></a>git push github main</span>
<span id="cb29-12"><a href="bioinf.html#cb29-12" aria-hidden="true" tabindex="-1"></a>git pull github main</span>
<span id="cb29-13"><a href="bioinf.html#cb29-13" aria-hidden="true" tabindex="-1"></a>git push gitee main</span>
<span id="cb29-14"><a href="bioinf.html#cb29-14" aria-hidden="true" tabindex="-1"></a>git pull gitee main</span>
<span id="cb29-15"><a href="bioinf.html#cb29-15" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb29-16"><a href="bioinf.html#cb29-16" aria-hidden="true" tabindex="-1"></a><span class="fl">5.</span> 将本地分支与远程分支进行关联</span>
<span id="cb29-17"><a href="bioinf.html#cb29-17" aria-hidden="true" tabindex="-1"></a>git push <span class="sc">--</span>set<span class="sc">-</span>upstream gitee main</span>
<span id="cb29-18"><a href="bioinf.html#cb29-18" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb29-19"><a href="bioinf.html#cb29-19" aria-hidden="true" tabindex="-1"></a><span class="fl">6.</span> 直接推送不指定分支</span>
<span id="cb29-20"><a href="bioinf.html#cb29-20" aria-hidden="true" tabindex="-1"></a>git push github</span>
<span id="cb29-21"><a href="bioinf.html#cb29-21" aria-hidden="true" tabindex="-1"></a>git pull github</span>
<span id="cb29-22"><a href="bioinf.html#cb29-22" aria-hidden="true" tabindex="-1"></a>git push gitee</span>
<span id="cb29-23"><a href="bioinf.html#cb29-23" aria-hidden="true" tabindex="-1"></a>git pull gitee</span>
<span id="cb29-24"><a href="bioinf.html#cb29-24" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb29-25"><a href="bioinf.html#cb29-25" aria-hidden="true" tabindex="-1"></a><span class="fl">7.</span> 移除远程仓库</span>
<span id="cb29-26"><a href="bioinf.html#cb29-26" aria-hidden="true" tabindex="-1"></a>git remote remove gitee</span></code></pre></div>
</div>
</div>
<div id="基因家族分析" class="section level2" number="3.6">
<h2>
<span class="header-section-number">3.6</span> 基因家族分析<a class="anchor" aria-label="anchor" href="#%E5%9F%BA%E5%9B%A0%E5%AE%B6%E6%97%8F%E5%88%86%E6%9E%90"><i class="fas fa-link"></i></a>
</h2>
<p>基因家族分析是一种常见的生物信息学分析套路，也是生物信息学数据挖掘发表小文章常用的分析方法，和GEO挖掘等类似。基因家族的分析鉴定可以用<a href="http://pfam.xfam.org/">pfam</a>上的<code>hmm</code>文件进行基因家族的检索鉴定，也可以用<code>blast</code>的方法进行比对鉴定，通常是适用拟南芥对应的基因家族进行比对鉴定。
植物转录因子数据库，<a href="http://planttfdb.gao-lab.org/">点击访问</a>。</p>
<div id="基因家族分析思路及文章撰写思路" class="section level3" number="3.6.1">
<h3>
<span class="header-section-number">3.6.1</span> 基因家族分析思路及文章撰写思路<a class="anchor" aria-label="anchor" href="#%E5%9F%BA%E5%9B%A0%E5%AE%B6%E6%97%8F%E5%88%86%E6%9E%90%E6%80%9D%E8%B7%AF%E5%8F%8A%E6%96%87%E7%AB%A0%E6%92%B0%E5%86%99%E6%80%9D%E8%B7%AF"><i class="fas fa-link"></i></a>
</h3>
<p>基因家族分析是继GEO数据挖掘后，一种新的生物信息学挖掘策略。</p>
<p>如何做基因家族研究，可以参考这个帖子：<a href="http://www.planttech.com.cn/blog/58882464a46" class="uri">http://www.planttech.com.cn/blog/58882464a46</a>。</p>
<p>为什么我们要选择三七呢？</p>
<p>首先三七参考基因组还不是很多，我们实验室有一个，今年杨生超副校长有一篇最新的，这些基因组数据为我们后续做三七基因家族研究提供了坚实的基础；其次，我们实验室以三七为主，有大量的三七资源，方便我们后续验证。</p>
<p>文章撰写的格式建议以<strong><em>Frontiers in Plant Science</em></strong>为模板，后续方便修改。</p>
<p>每个基因家族都有大量的综述，因为基因家族基本都是转录因子，转录因子基本都是有很好的综述的。</p>
</div>
<div id="数据准备" class="section level3" number="3.6.2">
<h3>
<span class="header-section-number">3.6.2</span> 数据准备<a class="anchor" aria-label="anchor" href="#%E6%95%B0%E6%8D%AE%E5%87%86%E5%A4%87"><i class="fas fa-link"></i></a>
</h3>
<p>需要准备的数据主要是参考基因组数据，包括<code>fasta</code>格式的序列文件、<code>gff</code>或<code>gtf</code>格式的基因组注释文件、蛋白质序列文件（通常是每个转录本的蛋白序列）、<code>cDNA</code>序列等文件。如果有转录组数据的话进行对应的转录组分析即可。除开上述这些文件外，还需要适用的文件还有<code>.hmm</code>格式的文件。</p>
</div>
<div id="软件准备" class="section level3" number="3.6.3">
<h3>
<span class="header-section-number">3.6.3</span> 软件准备<a class="anchor" aria-label="anchor" href="#%E8%BD%AF%E4%BB%B6%E5%87%86%E5%A4%87"><i class="fas fa-link"></i></a>
</h3>
<p>只需要会使用Linux系统，会安装Docker即可，然后下载<code>组学大讲堂</code>的镜像即可。<a href="https://hub.docker.com/r/omicsclass/gene-family">点击浏览</a>镜像地址。Docker的安装适用方法参考<a href="bioinf.html#WSL4Docker">3.3</a>。</p>
</div>
<div id="分析过程" class="section level3" number="3.6.4">
<h3>
<span class="header-section-number">3.6.4</span> 分析过程<a class="anchor" aria-label="anchor" href="#%E5%88%86%E6%9E%90%E8%BF%87%E7%A8%8B"><i class="fas fa-link"></i></a>
</h3>
<ul>
<li>mRNA_ID与基因ID的提取
由于一个基因会对应多个转录本，因此一个基因下会对应多个mRNA的编号。在后续的分析中，每个基因只需要选择一个转录本的编号进行分析即可，因为每个基因不同的转录本的序列差异是较小的。提取的代码：</li>
</ul>
<div class="sourceCode" id="cb30"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb30-1"><a href="bioinf.html#cb30-1" aria-hidden="true" tabindex="-1"></a>perl code<span class="sc">/</span>script<span class="sc">/</span>mRNAid_to_geneid.pl data<span class="sc">/</span>unzip_data<span class="sc">/</span><span class="er">*</span>.gff<span class="sc">*</span> results<span class="sc">/</span>step.<span class="fl">1.</span>get.mRNA.and.gene.ID<span class="sc">/</span>mRNA2geneID.txt</span>
<span id="cb30-2"><a href="bioinf.html#cb30-2" aria-hidden="true" tabindex="-1"></a>perl code<span class="sc">/</span>script<span class="sc">/</span>geneid_to_mRNAid.pl data<span class="sc">/</span>unzip_data<span class="sc">/</span><span class="er">*</span>.gff<span class="sc">*</span> results<span class="sc">/</span>step.<span class="fl">1.</span>get.mRNA.and.gene.ID<span class="sc">/</span>geneID2mRNAid.txt</span></code></pre></div>
<ul>
<li>检索结构域
这一步主要是以<code>.hmm</code>文件为基础检索该物种蛋白序列中含有该结构域的序列。输入文件包括<code>.hmm</code>文件和蛋白文件，输出<code>hmmsearch</code>的检索结果。其中用于后续筛选的是<code>evalue</code>这个参数，部分文章以0.001为阈值。<code>of</code>那一列表示的是某个基因对应的这个结构域有几个。</li>
</ul>
<div class="sourceCode" id="cb31"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb31-1"><a href="bioinf.html#cb31-1" aria-hidden="true" tabindex="-1"></a>hmmsearch <span class="sc">--</span>domtblout results<span class="sc">/</span>step.<span class="fl">2.</span>domain.search<span class="sc">/</span>hmm.txt <span class="sc">--</span>cut_tc data<span class="sc">/</span>unzip_data<span class="sc">/</span><span class="er">*</span>.hmm data<span class="sc">/</span>unzip_data<span class="sc">/</span><span class="er">*</span>.pep<span class="sc">*</span></span></code></pre></div>
<ul>
<li>选择结构域
由于一个基因的单个转录本可能会比对到多个结构域，因此需要对比对到的结构域进行选择。默认选择的是第一个结构域。下面代码的最后一个参数是<code>hmmsearch</code>输出文件里面的<code>E-value</code>,如果需要全部的第一个结构域，将阈值设置为1即可。</li>
</ul>
<div class="sourceCode" id="cb32"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb32-1"><a href="bioinf.html#cb32-1" aria-hidden="true" tabindex="-1"></a>perl code<span class="sc">/</span>script<span class="sc">/</span>domain_xulie.pl results<span class="sc">/</span>step.<span class="fl">2.</span>domain.search<span class="sc">/</span>hmm.txt data<span class="sc">/</span>unzip_data<span class="sc">/</span><span class="er">*</span>.pep<span class="sc">*</span> results<span class="sc">/</span>step.<span class="fl">2.</span>domain.search<span class="sc">/</span>domain.fa <span class="fl">1.2e-28</span></span></code></pre></div>
<ul>
<li>多序列比对
之所以要进行多序列比对，是因为下载的<code>.hmm</code>文件是来自很多物种的这个结构域组成的隐马尔科夫模型，进行多序列比对后将该物种检索到的结构域序列进行比对，再次构建该物种该基因家族的隐马尔科夫模型，会更加准确。</li>
</ul>
<div class="sourceCode" id="cb33"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb33-1"><a href="bioinf.html#cb33-1" aria-hidden="true" tabindex="-1"></a>echo <span class="sc">-</span>e <span class="st">'1</span><span class="sc">\n</span><span class="st">results/step.2.domain.search/domain.fa</span><span class="sc">\n</span><span class="st">2</span><span class="sc">\n</span><span class="st">1</span><span class="sc">\n</span><span class="st">results/step.2.domain.search/out.aln</span><span class="sc">\n</span><span class="st">r.domain.search/out.dnd</span><span class="sc">\n</span><span class="st">X</span><span class="sc">\n\n\n</span><span class="st">X</span><span class="sc">\n</span><span class="st">'</span> <span class="sc">|</span>clustalw</span></code></pre></div>
<ul>
<li>重构隐马尔科夫模型</li>
</ul>
<div class="sourceCode" id="cb34"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb34-1"><a href="bioinf.html#cb34-1" aria-hidden="true" tabindex="-1"></a>hmmbuild results<span class="sc">/</span>step.<span class="fl">2.</span>domain.search<span class="sc">/</span>new.hmm results<span class="sc">/</span>step.<span class="fl">2.</span>domain.search<span class="sc">/</span>out.aln</span></code></pre></div>
<ul>
<li>重新进行检索
利用构建得到的新的隐马尔科夫模型重新进行检索结构域。</li>
</ul>
<div class="sourceCode" id="cb35"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb35-1"><a href="bioinf.html#cb35-1" aria-hidden="true" tabindex="-1"></a>hmmsearch <span class="sc">--</span>domtblout results<span class="sc">/</span>step.<span class="fl">2.</span>domain.search<span class="sc">/</span>new.out.txt <span class="sc">--</span>cut_tc results<span class="sc">/</span>step.<span class="fl">2.</span>domain.search<span class="sc">/</span>new.hmm data<span class="sc">/</span>unzip_data<span class="sc">/</span><span class="er">*</span>.pep<span class="sc">*</span></span></code></pre></div>
<ul>
<li>筛选输出结果
对重新检索后的结果进行筛选，也是对<code>E-value</code>进行筛选。</li>
</ul>
<div class="sourceCode" id="cb36"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb36-1"><a href="bioinf.html#cb36-1" aria-hidden="true" tabindex="-1"></a>grep <span class="sc">-</span>v <span class="st">"^#"</span> results<span class="sc">/</span>step.<span class="fl">2.</span>domain.search<span class="sc">/</span>new.out.txt<span class="sc">|</span>awk <span class="st">'$7&lt;0.001 {print}'</span> <span class="sc">&gt;</span> results<span class="sc">/</span>step.<span class="fl">2.</span>domain.search<span class="sc">/</span>domain.new.out.selected.txt</span></code></pre></div>
<ul>
<li>去除重复的ID
上一步筛选得到的是该种中哪些基因是潜在的目标基因家族成员，而一个基因对应了多个mRNA，因此，只需要在筛选后的每个基因中选择一个具有代表性的mRNA进行后续的分析即可。这个提取唯一ID的步骤需要手动完成（PS：手动完成也很快）。手动挑选完mRNA的ID放在第一列，另存为文件<code>uniqueID.txt</code>。</li>
</ul>
<div class="sourceCode" id="cb37"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb37-1"><a href="bioinf.html#cb37-1" aria-hidden="true" tabindex="-1"></a>perl code<span class="sc">/</span>script<span class="sc">/</span>select_redundant_mRNA.pl results<span class="sc">/</span>step.<span class="fl">1.</span>get.mRNA.and.gene.ID<span class="sc">/</span>mRNA2geneID.txt results<span class="sc">/</span>step.<span class="fl">2.</span>domain.search<span class="sc">/</span>domain.new.out.selected.txt results<span class="sc">/</span>step.<span class="fl">2.</span>domain.search<span class="sc">/</span>remove_redundant_IDlist.txt</span></code></pre></div>
<ul>
<li>提取蛋白序列
在得到基因ID后需要提取蛋白序列进行后续的分析。在<a href="http://smart.embl.de/">SMART</a>或者<a href="http://pfam.xfam.org/search">Pfam</a>或<a href="https://www.ncbi.nlm.nih.gov/cdd/">NCBI CDD</a>确认这些基因是真真正正含有该结构域，没有的基因要剔除！在<code>SMART</code>中没有检索到结构域的基因在<code>gene.not.in.SMART.txt</code>中；在<code>Pfam</code>中全都是<code>WRKY</code>结构域，对应文件为<code>Pfam.results.txt</code>。</li>
</ul>
<div class="sourceCode" id="cb38"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb38-1"><a href="bioinf.html#cb38-1" aria-hidden="true" tabindex="-1"></a>perl code<span class="sc">/</span>script<span class="sc">/</span>get_fa_by_id.pl results<span class="sc">/</span>step.<span class="fl">2.</span>domain.search<span class="sc">/</span>uniqueID.txt data<span class="sc">/</span>unzip_data<span class="sc">/</span><span class="er">*</span>.pep<span class="sc">*</span> results<span class="sc">/</span>step</span>
<span id="cb38-2"><a href="bioinf.html#cb38-2" aria-hidden="true" tabindex="-1"></a>.<span class="fl">2.</span>domain.search<span class="sc">/</span>pep.need.confirm.fa</span></code></pre></div>
<ul>
<li>计算蛋白质分子量等</li>
</ul>
<div class="sourceCode" id="cb39"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb39-1"><a href="bioinf.html#cb39-1" aria-hidden="true" tabindex="-1"></a>perl code<span class="sc">/</span>script<span class="sc">/</span>stat_protein_fa.pl results<span class="sc">/</span>step.<span class="fl">2.</span>domain.search<span class="sc">/</span>pep.need.confirm.fa results<span class="sc">/</span>step.<span class="fl">2.</span>domain.search<span class="sc">/</span>pep.MW.txt</span></code></pre></div>
<ul>
<li>构建进化树
选择利用软件<code>CLUSTALW</code>进行多序列比对，然后利用<code>MEGA</code>构建进化树。<code>CLUSTALW</code>输出结果转换成<code>.fasta</code>格式的方法参考<a href="r.html#pac4xiang">1.2</a>。</li>
<li>Motif分析</li>
</ul>
<div class="sourceCode" id="cb40"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb40-1"><a href="bioinf.html#cb40-1" aria-hidden="true" tabindex="-1"></a>meme results<span class="sc">/</span>step.<span class="fl">3.</span>seq.and.tree<span class="sc">/</span>pep_confirmed.fa <span class="sc">-</span>protein <span class="sc">-</span>oc results<span class="sc">/</span>step.<span class="fl">4.</span>motif<span class="sc">/</span> <span class="sc">-</span>nostatus <span class="sc">-</span>time <span class="dv">18000</span> <span class="sc">-</span>maxsize <span class="dv">6000000</span> <span class="sc">-</span>mod anr <span class="sc">-</span>nmotifs <span class="dv">10</span> <span class="sc">-</span>minw <span class="dv">6</span> <span class="sc">-</span>maxw <span class="dv">100</span></span></code></pre></div>
<ul>
<li>基因结构分析</li>
</ul>
<div class="sourceCode" id="cb41"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb41-1"><a href="bioinf.html#cb41-1" aria-hidden="true" tabindex="-1"></a>perl code<span class="sc">/</span>script<span class="sc">/</span>get_gene_exon_from_gff.pl <span class="sc">-</span>in1 results<span class="sc">/</span>step.<span class="fl">2.</span>domain.search<span class="sc">/</span>uniqueID.txt <span class="sc">-</span>in2 data<span class="sc">/</span>unzip_data<span class="sc">/</span><span class="er">*</span>.gff<span class="sc">*</span> <span class="sc">-</span>out results<span class="sc">/</span>step.<span class="fl">5.</span>gene.structure<span class="sc">/</span>gene_exon_info.gff</span></code></pre></div>
<ul>
<li>基因在染色体上的定位</li>
</ul>
<div class="sourceCode" id="cb42"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb42-1"><a href="bioinf.html#cb42-1" aria-hidden="true" tabindex="-1"></a>samtools faidx data<span class="sc">/</span>unzip_data<span class="sc">/</span><span class="er">*</span>.dna<span class="sc">*</span></span>
<span id="cb42-2"><a href="bioinf.html#cb42-2" aria-hidden="true" tabindex="-1"></a>cp data<span class="sc">/</span>unzip_data<span class="sc">/</span><span class="er">*</span>.fai results<span class="sc">/</span>step.<span class="fl">5.</span>gene.structure<span class="sc">/</span></span>
<span id="cb42-3"><a href="bioinf.html#cb42-3" aria-hidden="true" tabindex="-1"></a>perl code<span class="sc">/</span>script<span class="sc">/</span>get_gene_weizhi.pl <span class="sc">-</span>in1 results<span class="sc">/</span>step.<span class="fl">2.</span>domain.search<span class="sc">/</span>uniqueID.txt <span class="sc">-</span>in2 data<span class="sc">/</span>unzip_data<span class="sc">/</span><span class="er">*</span>.gff<span class="sc">*</span> <span class="sc">-</span>out results<span class="sc">/</span>step.<span class="fl">5.</span>gene.structure<span class="sc">/</span>mrna_location.txt</span></code></pre></div>
<ul>
<li>顺式作用元件分析
脚本默认的启动子长度是1500bp。将提取得到的启动子序列上传到<a href="https://bioinformatics.psb.ugent.be/webtools/plantcare/html/">Plane CARE</a>进行分析。</li>
</ul>
<div class="sourceCode" id="cb43"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb43-1"><a href="bioinf.html#cb43-1" aria-hidden="true" tabindex="-1"></a>perl code<span class="sc">/</span>script<span class="sc">/</span>get_promoter.pl data<span class="sc">/</span>unzip_data<span class="sc">/</span><span class="er">*</span>dna.top<span class="sc">*</span> results<span class="sc">/</span>step.<span class="fl">5.</span>gene.structure<span class="sc">/</span>mrna_location.txt results<span class="sc">/</span>step.<span class="fl">6.</span>cis.acting.element<span class="sc">/</span>promoter.txt</span></code></pre></div>
<ul>
<li>基因家族成员的亚细胞定位分析
两个网站：<a href="https://wolfpsort.hgc.jp/">WolfPsort</a>和<a href="http://cello.life.nctu.edu.tw/">Cello</a>。</li>
</ul>
</div>
</div>
<div id="fasttree构建进化树" class="section level2" number="3.7">
<h2>
<span class="header-section-number">3.7</span> FastTree构建进化树<a class="anchor" aria-label="anchor" href="#fasttree%E6%9E%84%E5%BB%BA%E8%BF%9B%E5%8C%96%E6%A0%91"><i class="fas fa-link"></i></a>
</h2>
<p><a href="http://www.microbesonline.org/fasttree/">FastTree</a>是基于最大似然法构建进化树的软件，使用简单。Windows端直接下载，完后运行即可：</p>
<pre class="shell"><code>.\FastTree.exe .\YourAlignResults.fasta</code></pre>
<p>前面是软件名称，后面是比对好的序列文件。</p>
</div>
<div id="处理planttfdb下载的fasta格式序列" class="section level2" number="3.8">
<h2>
<span class="header-section-number">3.8</span> 处理PlantTFDB下载的fasta格式序列<a class="anchor" aria-label="anchor" href="#%E5%A4%84%E7%90%86planttfdb%E4%B8%8B%E8%BD%BD%E7%9A%84fasta%E6%A0%BC%E5%BC%8F%E5%BA%8F%E5%88%97"><i class="fas fa-link"></i></a>
</h2>
<div id="将序列id和物种信息进行提取" class="section level3" number="3.8.1">
<h3>
<span class="header-section-number">3.8.1</span> 将序列ID和物种信息进行提取<a class="anchor" aria-label="anchor" href="#%E5%B0%86%E5%BA%8F%E5%88%97id%E5%92%8C%E7%89%A9%E7%A7%8D%E4%BF%A1%E6%81%AF%E8%BF%9B%E8%A1%8C%E6%8F%90%E5%8F%96"><i class="fas fa-link"></i></a>
</h3>
<div class="sourceCode" id="cb45"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb45-1"><a href="bioinf.html#cb45-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> os</span>
<span id="cb45-2"><a href="bioinf.html#cb45-2" aria-hidden="true" tabindex="-1"></a>os.chdir(<span class="st">"C://Users//Administrator//Desktop//"</span>)</span>
<span id="cb45-3"><a href="bioinf.html#cb45-3" aria-hidden="true" tabindex="-1"></a><span class="co">#read txt method one</span></span>
<span id="cb45-4"><a href="bioinf.html#cb45-4" aria-hidden="true" tabindex="-1"></a>wrky_seq <span class="op">=</span> <span class="bu">open</span>(<span class="st">'wrky_seq.fasta'</span>,<span class="st">'w'</span>)</span>
<span id="cb45-5"><a href="bioinf.html#cb45-5" aria-hidden="true" tabindex="-1"></a>wrky_info <span class="op">=</span> <span class="bu">open</span>(<span class="st">'wrky_info.txt'</span>,<span class="st">'w'</span>)</span>
<span id="cb45-6"><a href="bioinf.html#cb45-6" aria-hidden="true" tabindex="-1"></a>f <span class="op">=</span> <span class="bu">open</span>(<span class="st">"seq.fas"</span>,<span class="st">'r'</span>)</span>
<span id="cb45-7"><a href="bioinf.html#cb45-7" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span> line <span class="kw">in</span> f:</span>
<span id="cb45-8"><a href="bioinf.html#cb45-8" aria-hidden="true" tabindex="-1"></a>    <span class="cf">if</span> <span class="bu">str</span>.startswith(line,<span class="st">"&gt;"</span>):</span>
<span id="cb45-9"><a href="bioinf.html#cb45-9" aria-hidden="true" tabindex="-1"></a>        seq_name <span class="op">=</span> <span class="bu">str</span>.split(line, <span class="st">'|'</span>)[<span class="dv">0</span>]</span>
<span id="cb45-10"><a href="bioinf.html#cb45-10" aria-hidden="true" tabindex="-1"></a>        <span class="co">#seq_name = str.split(seq_name,'.')[0]</span></span>
<span id="cb45-11"><a href="bioinf.html#cb45-11" aria-hidden="true" tabindex="-1"></a>        seq_species <span class="op">=</span> <span class="bu">str</span>.split(line, <span class="st">'|'</span>)[<span class="dv">1</span>]</span>
<span id="cb45-12"><a href="bioinf.html#cb45-12" aria-hidden="true" tabindex="-1"></a>        seq_name2 <span class="op">=</span> <span class="bu">str</span>.replace(seq_name, <span class="st">"&gt;"</span>, <span class="st">""</span>)</span>
<span id="cb45-13"><a href="bioinf.html#cb45-13" aria-hidden="true" tabindex="-1"></a>        <span class="co">#print(seq_name)</span></span>
<span id="cb45-14"><a href="bioinf.html#cb45-14" aria-hidden="true" tabindex="-1"></a>        wrky_seq.write(seq_name <span class="op">+</span> <span class="st">"</span><span class="ch">\n</span><span class="st">"</span>)</span>
<span id="cb45-15"><a href="bioinf.html#cb45-15" aria-hidden="true" tabindex="-1"></a>        wrky_info.write(seq_name <span class="op">+</span> <span class="st">"    "</span> <span class="op">+</span> seq_name2 <span class="op">+</span> <span class="st">"    "</span> <span class="op">+</span> seq_species <span class="op">+</span> <span class="st">"</span><span class="ch">\n</span><span class="st">"</span>)</span>
<span id="cb45-16"><a href="bioinf.html#cb45-16" aria-hidden="true" tabindex="-1"></a>    <span class="cf">else</span>:</span>
<span id="cb45-17"><a href="bioinf.html#cb45-17" aria-hidden="true" tabindex="-1"></a>        wrky_seq.write(line)</span>
<span id="cb45-18"><a href="bioinf.html#cb45-18" aria-hidden="true" tabindex="-1"></a>wrky_seq.close()</span>
<span id="cb45-19"><a href="bioinf.html#cb45-19" aria-hidden="true" tabindex="-1"></a>wrky_info.close()</span></code></pre></div>
</div>
<div id="将fasta格式的序列转换成data.frame格式" class="section level3" number="3.8.2">
<h3>
<span class="header-section-number">3.8.2</span> 将fasta格式的序列转换成data.frame格式<a class="anchor" aria-label="anchor" href="#%E5%B0%86fasta%E6%A0%BC%E5%BC%8F%E7%9A%84%E5%BA%8F%E5%88%97%E8%BD%AC%E6%8D%A2%E6%88%90data.frame%E6%A0%BC%E5%BC%8F"><i class="fas fa-link"></i></a>
</h3>
<div class="sourceCode" id="cb46"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/base/rm.html">rm</a></span><span class="op">(</span>list <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/ls.html">ls</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span>

<span class="va">df.info</span> <span class="op">&lt;-</span> <span class="fu">fread</span><span class="op">(</span><span class="st">"wrky_info.txt"</span>, header <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>

<span class="fu"><a href="https://rdrr.io/r/base/table.html">table</a></span><span class="op">(</span><span class="va">df.info</span><span class="op">$</span><span class="va">V3</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://rdrr.io/r/base/as.data.frame.html">as.data.frame</a></span><span class="op">(</span><span class="op">)</span> <span class="op">-&gt;</span> <span class="va">species</span>

<span class="co"># write.csv(species, file = '物种数量统计.csv', row.names = FALSE, quote = FALSE)</span>NA<span class="co"># 整理蛋白数据格式</span>NA<span class="va">df.seq</span> <span class="op">&lt;-</span> <span class="fu">fread</span><span class="op">(</span><span class="st">"seq.fas"</span>, header <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://rdrr.io/r/stats/na.fail.html">na.omit</a></span><span class="op">(</span><span class="op">)</span>
<span class="va">seq.num</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="op">)</span>

<span class="kw">for</span> <span class="op">(</span><span class="va">i</span> <span class="kw">in</span> <span class="fl">1</span><span class="op">:</span><span class="fu"><a href="https://rdrr.io/r/base/nrow.html">nrow</a></span><span class="op">(</span><span class="va">df.seq</span><span class="op">)</span><span class="op">)</span> <span class="op">{</span>
  <span class="kw">if</span> <span class="op">(</span><span class="fu">str_sub</span><span class="op">(</span><span class="va">df.seq</span><span class="op">$</span><span class="va">V1</span><span class="op">[</span><span class="va">i</span><span class="op">]</span>, <span class="fl">1</span>, <span class="fl">1</span><span class="op">)</span> <span class="op">==</span> <span class="st">"&gt;"</span><span class="op">)</span> <span class="op">{</span>
    <span class="va">seq.num</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="va">seq.num</span>, <span class="va">i</span><span class="op">)</span>
  <span class="op">}</span>
<span class="op">}</span>

<span class="va">df.temp</span> <span class="op">&lt;-</span> <span class="va">seq.num</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://rdrr.io/r/base/as.data.frame.html">as.data.frame</a></span><span class="op">(</span><span class="op">)</span>

<span class="fu"><a href="https://rdrr.io/r/base/colnames.html">colnames</a></span><span class="op">(</span><span class="va">df.temp</span><span class="op">)</span><span class="op">[</span><span class="fl">1</span><span class="op">]</span> <span class="op">&lt;-</span> <span class="st">"v1"</span>

<span class="va">df.temp</span> <span class="op">&lt;-</span> <span class="va">df.temp</span> <span class="op">%&gt;%</span>
  <span class="fu">dplyr</span><span class="fu">::</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span>
    start <span class="op">=</span> <span class="va">v1</span> <span class="op">+</span> <span class="fl">1</span>,
    end <span class="op">=</span> <span class="va">v1</span> <span class="op">-</span> <span class="fl">1</span>
  <span class="op">)</span>

<span class="va">seq.info</span> <span class="op">&lt;-</span> <span class="va">df.seq</span><span class="op">[</span><span class="va">df.temp</span><span class="op">$</span><span class="va">v1</span>, <span class="op">]</span> <span class="op">%&gt;%</span> <span class="fu">dplyr</span><span class="fu">::</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span>seq <span class="op">=</span> <span class="st">""</span><span class="op">)</span>

<span class="kw">for</span> <span class="op">(</span><span class="va">i</span> <span class="kw">in</span> <span class="fl">1</span><span class="op">:</span><span class="fu"><a href="https://rdrr.io/r/base/nrow.html">nrow</a></span><span class="op">(</span><span class="va">df.temp</span><span class="op">)</span><span class="op">)</span> <span class="op">{</span>
  <span class="va">start</span> <span class="op">&lt;-</span> <span class="va">df.temp</span><span class="op">$</span><span class="va">start</span><span class="op">[</span><span class="va">i</span><span class="op">]</span>

  <span class="kw">if</span> <span class="op">(</span><span class="va">i</span> <span class="op">==</span> <span class="fu"><a href="https://rdrr.io/r/base/nrow.html">nrow</a></span><span class="op">(</span><span class="va">df.temp</span><span class="op">)</span><span class="op">)</span> <span class="op">{</span>
    <span class="va">end</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/nrow.html">nrow</a></span><span class="op">(</span><span class="va">df.seq</span><span class="op">)</span>
  <span class="op">}</span> <span class="kw">else</span> <span class="op">{</span>
    <span class="va">end</span> <span class="op">&lt;-</span> <span class="va">df.temp</span><span class="op">$</span><span class="va">end</span><span class="op">[</span><span class="va">i</span> <span class="op">+</span> <span class="fl">1</span><span class="op">]</span>
  <span class="op">}</span>

  <span class="va">seq.temp</span> <span class="op">&lt;-</span> <span class="st">""</span>

  <span class="kw">for</span> <span class="op">(</span><span class="va">j</span> <span class="kw">in</span> <span class="va">start</span><span class="op">:</span><span class="va">end</span><span class="op">)</span> <span class="op">{</span>
    <span class="va">seq.temp</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span><span class="op">(</span><span class="va">seq.temp</span>, <span class="va">df.seq</span><span class="op">$</span><span class="va">V1</span><span class="op">[</span><span class="va">j</span><span class="op">]</span><span class="op">)</span>
  <span class="op">}</span>
  <span class="va">seq.info</span><span class="op">$</span><span class="va">seq</span><span class="op">[</span><span class="va">i</span><span class="op">]</span> <span class="op">&lt;-</span> <span class="va">seq.temp</span>
<span class="op">}</span>

<span class="va">selected.species.info</span> <span class="op">&lt;-</span> <span class="cn">NULL</span>


<span class="fu"><a href="https://rdrr.io/r/base/Random.html">set.seed</a></span><span class="op">(</span><span class="fl">117423</span><span class="op">)</span>
<span class="va">species.random</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/sample.html">sample</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/unique.html">unique</a></span><span class="op">(</span><span class="va">df.info</span><span class="op">$</span><span class="va">V4</span><span class="op">)</span>, <span class="fl">30</span>, replace <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>

<span class="kw">for</span> <span class="op">(</span><span class="va">i</span> <span class="kw">in</span> <span class="va">species.random</span><span class="op">)</span> <span class="op">{</span>
  <span class="va">df.info.sub</span> <span class="op">&lt;-</span> <span class="va">df.info</span> <span class="op">%&gt;%</span>
    <span class="fu">dplyr</span><span class="fu">::</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op">(</span><span class="va">V4</span> <span class="op">==</span> <span class="va">i</span><span class="op">)</span>

  <span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/nrow.html">nrow</a></span><span class="op">(</span><span class="va">df.info.sub</span><span class="op">)</span> <span class="op">&lt;</span> <span class="fl">10</span><span class="op">)</span> <span class="op">{</span>
    <span class="va">selected.species.info</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/cbind.html">rbind</a></span><span class="op">(</span><span class="va">selected.species.info</span>, <span class="va">df.info.sub</span><span class="op">)</span>
  <span class="op">}</span> <span class="kw">else</span> <span class="op">{</span>
    <span class="va">sample.num</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/sample.html">sample</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/nrow.html">nrow</a></span><span class="op">(</span><span class="va">df.info.sub</span><span class="op">)</span>, <span class="fl">10</span>, replace <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
    <span class="va">selected.species.info</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/cbind.html">rbind</a></span><span class="op">(</span><span class="va">selected.species.info</span>, <span class="va">df.info.sub</span><span class="op">[</span><span class="va">sample.num</span>, <span class="op">]</span><span class="op">)</span>
  <span class="op">}</span>
<span class="op">}</span>

<span class="fu">fwrite</span><span class="op">(</span><span class="va">selected.species.info</span>, file <span class="op">=</span> <span class="st">"随机选择的30个物种信息.txt"</span>FALSE, r<span class="op">=</span>w<span class="cn">FALSE</span>s = FALSE, c<span class="op">=</span>l<span class="cn">FALSE</span>NA<span class="op">=</span>NA<span class="cn">FALSE</span>NA<span class="op">)</span>NA<span class="kw">if</span> <span class="op">(</span><span class="cn">FALSE</span><span class="op">)</span> <span class="op">{</span>
  <span class="va">species</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span>
    <span class="st">"Arabidopsis_thaliana"</span>,
    <span class="co">#' Nicotiana_tabacum',</span>
    <span class="co">#' Oryza_sativa_subsp._indica',</span>
    <span class="st">"Oryza_sativa_subsp._japonica"</span>,
    <span class="st">"Zea_mays"</span>
    <span class="co">#' Glycine_max',</span>
    <span class="co">#' Solanum_tuberosum',</span>
    <span class="co">#' Triticum_aestivum'</span>
  <span class="op">)</span>
<span class="op">}</span>


<span class="va">df.all</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/merge.html">merge</a></span><span class="op">(</span><span class="va">seq.info</span>, <span class="va">selected.species.info</span>, by <span class="op">=</span> <span class="st">"V1"</span>, all.y <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span>

<span class="co"># filter</span>

<span class="co"># df.selected = seq.info %&gt;% dplyr::filter(V1 %in% selected.species.info$V1)</span>

<span class="va">df.selected</span> <span class="op">&lt;-</span> <span class="va">df.all</span>

<span class="va">seq.selected</span> <span class="op">&lt;-</span> <span class="cn">NULL</span>

<span class="kw">for</span> <span class="op">(</span><span class="va">i</span> <span class="kw">in</span> <span class="fl">1</span><span class="op">:</span><span class="fu"><a href="https://rdrr.io/r/base/nrow.html">nrow</a></span><span class="op">(</span><span class="va">df.selected</span><span class="op">)</span><span class="op">)</span> <span class="op">{</span>
  <span class="va">seq.selected</span> <span class="op">&lt;-</span> <span class="va">seq.selected</span> <span class="op">%&gt;%</span>
    <span class="fu"><a href="https://rdrr.io/r/base/cbind.html">rbind</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span><span class="op">(</span>temp <span class="op">=</span> <span class="va">df.selected</span><span class="op">$</span><span class="va">V2</span><span class="op">[</span><span class="va">i</span><span class="op">]</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span>
    <span class="fu"><a href="https://rdrr.io/r/base/cbind.html">rbind</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span><span class="op">(</span>temp <span class="op">=</span> <span class="va">df.selected</span><span class="op">$</span><span class="va">seq</span><span class="op">[</span><span class="va">i</span><span class="op">]</span><span class="op">)</span><span class="op">)</span>
<span class="op">}</span>

<span class="fu">fwrite</span><span class="op">(</span><span class="va">seq.selected</span>, file <span class="op">=</span> <span class="st">"选中的序列.fas"</span>.names = FAL<span class="op">=</span>E<span class="cn">FALSE</span>te = FAL<span class="op">=</span>E<span class="cn">FALSE</span>.names = FAL<span class="op">=</span>E<span class="cn">FALSE</span>NA<span class="op">)</span>NA</code></pre></div>
</div>
</div>
<div id="软件安装" class="section level2" number="3.9">
<h2>
<span class="header-section-number">3.9</span> 软件安装<a class="anchor" aria-label="anchor" href="#%E8%BD%AF%E4%BB%B6%E5%AE%89%E8%A3%85"><i class="fas fa-link"></i></a>
</h2>
<div id="aspera" class="section level3" number="3.9.1">
<h3>
<span class="header-section-number">3.9.1</span> Aspera<a class="anchor" aria-label="anchor" href="#aspera"><i class="fas fa-link"></i></a>
</h3>
<div class="sourceCode" id="cb47"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb47-1"><a href="bioinf.html#cb47-1" aria-hidden="true" tabindex="-1"></a>wget https<span class="sc">:</span><span class="er">//</span>ak<span class="sc">-</span>delivery04<span class="sc">-</span>mul.dhe.ibm.com<span class="sc">/</span>sar<span class="sc">/</span>CMA<span class="sc">/</span>OSA<span class="sc">/</span>09cne<span class="sc">/</span><span class="dv">0</span><span class="sc">/</span>ibm<span class="sc">-</span>aspera<span class="sc">-</span>connect<span class="dv">-3</span>.<span class="dv">11</span>.<span class="fl">0.5</span><span class="sc">-</span>linux<span class="sc">-</span>g2<span class="fl">.12-64.</span>tar.gz</span>
<span id="cb47-2"><a href="bioinf.html#cb47-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb47-3"><a href="bioinf.html#cb47-3" aria-hidden="true" tabindex="-1"></a>tar <span class="sc">-</span>zxvf ibm<span class="sc">-</span>aspera<span class="sc">-</span>connect<span class="dv">-3</span>.<span class="dv">11</span>.<span class="fl">0.5</span><span class="sc">-</span>linux<span class="sc">-</span>g2<span class="fl">.12-64.</span>tar.gz</span>
<span id="cb47-4"><a href="bioinf.html#cb47-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb47-5"><a href="bioinf.html#cb47-5" aria-hidden="true" tabindex="-1"></a>.<span class="sc">/</span>ibm<span class="sc">-</span>aspera<span class="sc">-</span>connect<span class="dv">-3</span>.<span class="dv">11</span>.<span class="fl">0.5</span><span class="sc">-</span>linux<span class="sc">-</span>g2<span class="fl">.12-64.</span>sh</span>
<span id="cb47-6"><a href="bioinf.html#cb47-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb47-7"><a href="bioinf.html#cb47-7" aria-hidden="true" tabindex="-1"></a>echo <span class="st">"""export PATH=</span><span class="sc">\"</span><span class="st">/home/xiang/.aspera/connect/bin:\$PATH</span><span class="sc">\"</span><span class="st"> """</span> <span class="sc">&gt;</span><span class="er">&gt;</span> <span class="er">~/</span>.bashrc</span>
<span id="cb47-8"><a href="bioinf.html#cb47-8" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb47-9"><a href="bioinf.html#cb47-9" aria-hidden="true" tabindex="-1"></a>source <span class="sc">~</span><span class="er">/</span>.bashrc</span>
<span id="cb47-10"><a href="bioinf.html#cb47-10" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb47-11"><a href="bioinf.html#cb47-11" aria-hidden="true" tabindex="-1"></a>ascp <span class="sc">-</span>h</span>
<span id="cb47-12"><a href="bioinf.html#cb47-12" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb47-13"><a href="bioinf.html#cb47-13" aria-hidden="true" tabindex="-1"></a>ascp<span class="sc">-</span>i <span class="sc">/</span>mnt<span class="sc">/</span>c<span class="sc">/</span>Users<span class="sc">/</span>Administrator<span class="sc">/</span>Desktop<span class="sc">/</span>aspera.openssh <span class="sc">-</span>QT <span class="sc">-</span>l100m <span class="sc">-</span>k1 d <span class="sc">/</span>mnt<span class="sc">/</span>h<span class="sc">/</span>BaiduNetdiskDownload<span class="sc">/</span><span class="er">*</span>.gz subasp<span class="sc">@</span>upload.ncbi.nlm.nih.gov<span class="sc">:</span>uploads<span class="sc">/</span>luolifenllf_126.com_tCdfcqJq<span class="sc">/</span>20210816upload</span>
<span id="cb47-14"><a href="bioinf.html#cb47-14" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb47-15"><a href="bioinf.html#cb47-15" aria-hidden="true" tabindex="-1"></a>ascp <span class="sc">-</span>i aspera.openssh <span class="sc">-</span>QT <span class="sc">-</span>l1000m <span class="sc">-</span>k1 <span class="sc">-</span>d A2.R2.fastq.gz subasp<span class="sc">@</span>upload.ncbi.nlm.nih.gov<span class="sc">:</span>uploads<span class="sc">/</span>luolifenllf_126.com_tCdfcqJq<span class="sc">/</span>20210816upload</span></code></pre></div>
</div>
</div>
<div id="ubuntu搭建生信环境" class="section level2" number="3.10">
<h2>
<span class="header-section-number">3.10</span> Ubuntu搭建生信环境<a class="anchor" aria-label="anchor" href="#ubuntu%E6%90%AD%E5%BB%BA%E7%94%9F%E4%BF%A1%E7%8E%AF%E5%A2%83"><i class="fas fa-link"></i></a>
</h2>
<p>下面的代码来自王通老师。</p>
<div id="旧版本" class="section level3" number="3.10.1">
<h3>
<span class="header-section-number">3.10.1</span> 旧版本<a class="anchor" aria-label="anchor" href="#%E6%97%A7%E7%89%88%E6%9C%AC"><i class="fas fa-link"></i></a>
</h3>
<div class="sourceCode" id="cb48"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb48-1"><a href="bioinf.html#cb48-1" aria-hidden="true" tabindex="-1"></a><span class="co">#下载ubuntu 20.04镜像</span></span>
<span id="cb48-2"><a href="bioinf.html#cb48-2" aria-hidden="true" tabindex="-1"></a>https<span class="sc">:</span><span class="er">//</span>ftp.sjtu.edu.cn<span class="sc">/</span>ubuntu<span class="sc">-</span>cd<span class="sc">/</span><span class="dv">20</span>.<span class="fl">04.1</span><span class="sc">/</span>ubuntu<span class="dv">-20</span>.<span class="fl">04.1</span><span class="sc">-</span>desktop<span class="sc">-</span>amd64.iso</span>
<span id="cb48-3"><a href="bioinf.html#cb48-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb48-4"><a href="bioinf.html#cb48-4" aria-hidden="true" tabindex="-1"></a><span class="co">#制作USB启动盘</span></span>
<span id="cb48-5"><a href="bioinf.html#cb48-5" aria-hidden="true" tabindex="-1"></a><span class="co">#下载使用rufus https://rufus.ie/</span></span>
<span id="cb48-6"><a href="bioinf.html#cb48-6" aria-hidden="true" tabindex="-1"></a><span class="co">#或者ultraISO https://cn.ultraiso.net/</span></span>
<span id="cb48-7"><a href="bioinf.html#cb48-7" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb48-8"><a href="bioinf.html#cb48-8" aria-hidden="true" tabindex="-1"></a><span class="co">#挂载磁盘</span></span>
<span id="cb48-9"><a href="bioinf.html#cb48-9" aria-hidden="true" tabindex="-1"></a><span class="co">#假设未挂载磁盘为/dev/sdb</span></span>
<span id="cb48-10"><a href="bioinf.html#cb48-10" aria-hidden="true" tabindex="-1"></a>fdisk <span class="sc">-</span>l</span>
<span id="cb48-11"><a href="bioinf.html#cb48-11" aria-hidden="true" tabindex="-1"></a>parted <span class="sc">/</span>dev<span class="sc">/</span>sdb</span>
<span id="cb48-12"><a href="bioinf.html#cb48-12" aria-hidden="true" tabindex="-1"></a><span class="co">#交互界面 </span></span>
<span id="cb48-13"><a href="bioinf.html#cb48-13" aria-hidden="true" tabindex="-1"></a>mklabel gpt</span>
<span id="cb48-14"><a href="bioinf.html#cb48-14" aria-hidden="true" tabindex="-1"></a>quit</span>
<span id="cb48-15"><a href="bioinf.html#cb48-15" aria-hidden="true" tabindex="-1"></a><span class="co">#格式化磁盘</span></span>
<span id="cb48-16"><a href="bioinf.html#cb48-16" aria-hidden="true" tabindex="-1"></a>mkfs.xfs <span class="sc">-</span>f <span class="sc">/</span>dev<span class="sc">/</span>sdb </span>
<span id="cb48-17"><a href="bioinf.html#cb48-17" aria-hidden="true" tabindex="-1"></a><span class="co">#挂载磁盘</span></span>
<span id="cb48-18"><a href="bioinf.html#cb48-18" aria-hidden="true" tabindex="-1"></a>mkdir <span class="sc">/</span>ifs1</span>
<span id="cb48-19"><a href="bioinf.html#cb48-19" aria-hidden="true" tabindex="-1"></a>mount <span class="sc">/</span>dev<span class="sc">/</span>sdb <span class="sc">/</span>ifs1</span>
<span id="cb48-20"><a href="bioinf.html#cb48-20" aria-hidden="true" tabindex="-1"></a><span class="co">#修改fstab</span></span>
<span id="cb48-21"><a href="bioinf.html#cb48-21" aria-hidden="true" tabindex="-1"></a>echo <span class="st">"/dev/sdb /ifs1                       xfs     defaults,uquota        0 0"</span> <span class="sc">&gt;</span><span class="er">&gt;/</span>etc<span class="sc">/</span>fstab</span>
<span id="cb48-22"><a href="bioinf.html#cb48-22" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb48-23"><a href="bioinf.html#cb48-23" aria-hidden="true" tabindex="-1"></a><span class="co">#创建root账户</span></span>
<span id="cb48-24"><a href="bioinf.html#cb48-24" aria-hidden="true" tabindex="-1"></a>sudo passwd root</span>
<span id="cb48-25"><a href="bioinf.html#cb48-25" aria-hidden="true" tabindex="-1"></a>输入当前用户密码：</span>
<span id="cb48-26"><a href="bioinf.html#cb48-26" aria-hidden="true" tabindex="-1"></a>输入root密码：</span>
<span id="cb48-27"><a href="bioinf.html#cb48-27" aria-hidden="true" tabindex="-1"></a>再次输入root密码：</span>
<span id="cb48-28"><a href="bioinf.html#cb48-28" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb48-29"><a href="bioinf.html#cb48-29" aria-hidden="true" tabindex="-1"></a><span class="co">#以下操作使用root账户完成</span></span>
<span id="cb48-30"><a href="bioinf.html#cb48-30" aria-hidden="true" tabindex="-1"></a>su <span class="sc">-</span></span>
<span id="cb48-31"><a href="bioinf.html#cb48-31" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb48-32"><a href="bioinf.html#cb48-32" aria-hidden="true" tabindex="-1"></a><span class="co">#修改源</span></span>
<span id="cb48-33"><a href="bioinf.html#cb48-33" aria-hidden="true" tabindex="-1"></a>cp <span class="sc">/</span>etc<span class="sc">/</span>apt<span class="sc">/</span>sources.list <span class="sc">/</span>etc<span class="sc">/</span>apt<span class="sc">/</span>sources.list.bak</span>
<span id="cb48-34"><a href="bioinf.html#cb48-34" aria-hidden="true" tabindex="-1"></a>sed <span class="sc">-</span>i <span class="st">'s#cn.archive.ubuntu.com#mirrors.aliyun.com#g'</span> <span class="sc">/</span>etc<span class="sc">/</span>apt<span class="sc">/</span>sources.list</span>
<span id="cb48-35"><a href="bioinf.html#cb48-35" aria-hidden="true" tabindex="-1"></a>sudo apt<span class="sc">-</span>get update <span class="sc">&amp;&amp;</span> sudo apt<span class="sc">-</span>get upgrade</span>
<span id="cb48-36"><a href="bioinf.html#cb48-36" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb48-37"><a href="bioinf.html#cb48-37" aria-hidden="true" tabindex="-1"></a><span class="co">#ssh登录</span></span>
<span id="cb48-38"><a href="bioinf.html#cb48-38" aria-hidden="true" tabindex="-1"></a>apt install openssh<span class="sc">-</span>server</span>
<span id="cb48-39"><a href="bioinf.html#cb48-39" aria-hidden="true" tabindex="-1"></a>ps <span class="sc">-</span>e <span class="sc">|</span>  grep ssh   <span class="co">#检查ssh server是否启动</span></span>
<span id="cb48-40"><a href="bioinf.html#cb48-40" aria-hidden="true" tabindex="-1"></a>sudo <span class="sc">/</span>etc<span class="sc">/</span>init.d<span class="sc">/</span>ssh start  <span class="co">#启动</span></span>
<span id="cb48-41"><a href="bioinf.html#cb48-41" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb48-42"><a href="bioinf.html#cb48-42" aria-hidden="true" tabindex="-1"></a><span class="co">#安装java</span></span>
<span id="cb48-43"><a href="bioinf.html#cb48-43" aria-hidden="true" tabindex="-1"></a>apt<span class="sc">-</span>get install openjdk<span class="dv">-8</span><span class="sc">-</span>jdk</span>
<span id="cb48-44"><a href="bioinf.html#cb48-44" aria-hidden="true" tabindex="-1"></a>sudo add<span class="sc">-</span>apt<span class="sc">-</span>repository ppa<span class="sc">:</span>webupd8team<span class="sc">/</span>java</span>
<span id="cb48-45"><a href="bioinf.html#cb48-45" aria-hidden="true" tabindex="-1"></a>apt update</span>
<span id="cb48-46"><a href="bioinf.html#cb48-46" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y oracle<span class="sc">-</span>java8<span class="sc">-</span>installer</span>
<span id="cb48-47"><a href="bioinf.html#cb48-47" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y zlib1g zlib1g.dev</span>
<span id="cb48-48"><a href="bioinf.html#cb48-48" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y libboost<span class="sc">-</span>dev</span>
<span id="cb48-49"><a href="bioinf.html#cb48-49" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb48-50"><a href="bioinf.html#cb48-50" aria-hidden="true" tabindex="-1"></a><span class="co">#安装R以及Rstudio</span></span>
<span id="cb48-51"><a href="bioinf.html#cb48-51" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y r<span class="sc">-</span>base</span>
<span id="cb48-52"><a href="bioinf.html#cb48-52" aria-hidden="true" tabindex="-1"></a>https<span class="sc">:</span><span class="er">//</span>download1.rstudio.org<span class="sc">/</span>desktop<span class="sc">/</span>bionic<span class="sc">/</span>amd64<span class="sc">/</span>rstudio<span class="dv">-1</span>.<span class="fl">3.1093</span><span class="sc">-</span>amd64.deb</span>
<span id="cb48-53"><a href="bioinf.html#cb48-53" aria-hidden="true" tabindex="-1"></a>dpkg <span class="sc">-</span>i rstudio<span class="dv">-1</span>.<span class="fl">3.1093</span><span class="sc">-</span>amd64.deb</span>
<span id="cb48-54"><a href="bioinf.html#cb48-54" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb48-55"><a href="bioinf.html#cb48-55" aria-hidden="true" tabindex="-1"></a><span class="co">#安装一些小工具</span></span>
<span id="cb48-56"><a href="bioinf.html#cb48-56" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y git vim tree creen htop cmake lftp lrzsz</span>
<span id="cb48-57"><a href="bioinf.html#cb48-57" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb48-58"><a href="bioinf.html#cb48-58" aria-hidden="true" tabindex="-1"></a><span class="co">#apt安装生物软件</span></span>
<span id="cb48-59"><a href="bioinf.html#cb48-59" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y bwa</span>
<span id="cb48-60"><a href="bioinf.html#cb48-60" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y samtools </span>
<span id="cb48-61"><a href="bioinf.html#cb48-61" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y bcftools</span>
<span id="cb48-62"><a href="bioinf.html#cb48-62" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y blast2</span>
<span id="cb48-63"><a href="bioinf.html#cb48-63" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y bedtools</span>
<span id="cb48-64"><a href="bioinf.html#cb48-64" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y seqtk</span>
<span id="cb48-65"><a href="bioinf.html#cb48-65" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y minimap2</span>
<span id="cb48-66"><a href="bioinf.html#cb48-66" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y bowtie2</span>
<span id="cb48-67"><a href="bioinf.html#cb48-67" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y phylip</span>
<span id="cb48-68"><a href="bioinf.html#cb48-68" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y clustalx</span>
<span id="cb48-69"><a href="bioinf.html#cb48-69" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y canu</span>
<span id="cb48-70"><a href="bioinf.html#cb48-70" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y kraken2</span>
<span id="cb48-71"><a href="bioinf.html#cb48-71" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y hisat2</span>
<span id="cb48-72"><a href="bioinf.html#cb48-72" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y stringtie</span>
<span id="cb48-73"><a href="bioinf.html#cb48-73" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y jellyfish</span>
<span id="cb48-74"><a href="bioinf.html#cb48-74" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y circos</span>
<span id="cb48-75"><a href="bioinf.html#cb48-75" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y nanopolish</span>
<span id="cb48-76"><a href="bioinf.html#cb48-76" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y nanook</span>
<span id="cb48-77"><a href="bioinf.html#cb48-77" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y centrifuge</span>
<span id="cb48-78"><a href="bioinf.html#cb48-78" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y rna<span class="sc">-</span>star</span>
<span id="cb48-79"><a href="bioinf.html#cb48-79" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y freebayes</span>
<span id="cb48-80"><a href="bioinf.html#cb48-80" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y cnvkit</span>
<span id="cb48-81"><a href="bioinf.html#cb48-81" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y spades</span>
<span id="cb48-82"><a href="bioinf.html#cb48-82" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y mothur</span>
<span id="cb48-83"><a href="bioinf.html#cb48-83" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y muscle</span>
<span id="cb48-84"><a href="bioinf.html#cb48-84" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y mafft</span>
<span id="cb48-85"><a href="bioinf.html#cb48-85" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y iqtree</span>
<span id="cb48-86"><a href="bioinf.html#cb48-86" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y sniffles</span>
<span id="cb48-87"><a href="bioinf.html#cb48-87" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y last<span class="sc">-</span>align</span>
<span id="cb48-88"><a href="bioinf.html#cb48-88" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y augustus</span>
<span id="cb48-89"><a href="bioinf.html#cb48-89" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y bamtools </span>
<span id="cb48-90"><a href="bioinf.html#cb48-90" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y bedops</span>
<span id="cb48-91"><a href="bioinf.html#cb48-91" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y delly</span>
<span id="cb48-92"><a href="bioinf.html#cb48-92" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb48-93"><a href="bioinf.html#cb48-93" aria-hidden="true" tabindex="-1"></a><span class="co">#安装浏览器</span></span>
<span id="cb48-94"><a href="bioinf.html#cb48-94" aria-hidden="true" tabindex="-1"></a>apt<span class="sc">-</span>get install <span class="sc">-</span>y chromium<span class="sc">-</span>browser</span>
<span id="cb48-95"><a href="bioinf.html#cb48-95" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb48-96"><a href="bioinf.html#cb48-96" aria-hidden="true" tabindex="-1"></a><span class="co">#安装微信</span></span>
<span id="cb48-97"><a href="bioinf.html#cb48-97" aria-hidden="true" tabindex="-1"></a>wget https<span class="sc">:</span><span class="er">//</span>www.ubuntukylin.com<span class="sc">/</span>public<span class="sc">/</span>pdf<span class="sc">/</span>wine<span class="sc">-</span>wechat_1<span class="fl">.0</span><span class="sc">-</span>windows2.<span class="fl">8.6</span>_all.deb</span>
<span id="cb48-98"><a href="bioinf.html#cb48-98" aria-hidden="true" tabindex="-1"></a><span class="co">#Debian 系的操作系统可以执行这样的命令：</span></span>
<span id="cb48-99"><a href="bioinf.html#cb48-99" aria-hidden="true" tabindex="-1"></a>sudo dpkg <span class="sc">--</span>add<span class="sc">-</span>architecture i386</span>
<span id="cb48-100"><a href="bioinf.html#cb48-100" aria-hidden="true" tabindex="-1"></a>sudo apt update</span>
<span id="cb48-101"><a href="bioinf.html#cb48-101" aria-hidden="true" tabindex="-1"></a><span class="co">#安装 wine 应用所需的依赖，也就是 wine：</span></span>
<span id="cb48-102"><a href="bioinf.html#cb48-102" aria-hidden="true" tabindex="-1"></a>sudo apt install wine<span class="sc">-</span>stable</span>
<span id="cb48-103"><a href="bioinf.html#cb48-103" aria-hidden="true" tabindex="-1"></a><span class="co">#使用 dpkg 安装 wine 应用：</span></span>
<span id="cb48-104"><a href="bioinf.html#cb48-104" aria-hidden="true" tabindex="-1"></a>sudo dpkg <span class="sc">-</span>i wine<span class="sc">-</span>wechat_1<span class="fl">.0</span><span class="sc">-</span>windows2.<span class="fl">8.6</span>_all.deb</span>
<span id="cb48-105"><a href="bioinf.html#cb48-105" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb48-106"><a href="bioinf.html#cb48-106" aria-hidden="true" tabindex="-1"></a><span class="co">#安装bioconda</span></span>
<span id="cb48-107"><a href="bioinf.html#cb48-107" aria-hidden="true" tabindex="-1"></a>wget https<span class="sc">:</span><span class="er">//</span>repo.continuum.io<span class="sc">/</span>miniconda<span class="sc">/</span>Miniconda3<span class="sc">-</span>latest<span class="sc">-</span>Linux<span class="sc">-</span>x86_64.sh  </span>
<span id="cb48-108"><a href="bioinf.html#cb48-108" aria-hidden="true" tabindex="-1"></a>sh Miniconda3<span class="sc">-</span>latest<span class="sc">-</span>Linux<span class="sc">-</span>x86_64.sh  </span>
<span id="cb48-109"><a href="bioinf.html#cb48-109" aria-hidden="true" tabindex="-1"></a>source <span class="sc">~</span><span class="er">/</span>.bashrc</span>
<span id="cb48-110"><a href="bioinf.html#cb48-110" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb48-111"><a href="bioinf.html#cb48-111" aria-hidden="true" tabindex="-1"></a><span class="co">#添加软件源</span></span>
<span id="cb48-112"><a href="bioinf.html#cb48-112" aria-hidden="true" tabindex="-1"></a>conda config <span class="sc">--</span>add channels bioconda </span>
<span id="cb48-113"><a href="bioinf.html#cb48-113" aria-hidden="true" tabindex="-1"></a>conda config <span class="sc">--</span>add channels conda<span class="sc">-</span>forge</span></code></pre></div>
</div>
<div id="新版本" class="section level3" number="3.10.2">
<h3>
<span class="header-section-number">3.10.2</span> 新版本<a class="anchor" aria-label="anchor" href="#%E6%96%B0%E7%89%88%E6%9C%AC"><i class="fas fa-link"></i></a>
</h3>
<div class="sourceCode" id="cb49"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb49-1"><a href="bioinf.html#cb49-1" aria-hidden="true" tabindex="-1"></a><span class="do">#############################</span></span>
<span id="cb49-2"><a href="bioinf.html#cb49-2" aria-hidden="true" tabindex="-1"></a><span class="co">#     获得Linux环境          #</span></span>
<span id="cb49-3"><a href="bioinf.html#cb49-3" aria-hidden="true" tabindex="-1"></a><span class="do">#############################</span></span>
<span id="cb49-4"><a href="bioinf.html#cb49-4" aria-hidden="true" tabindex="-1"></a><span class="co">#下载ubuntu 20.04镜像</span></span>
<span id="cb49-5"><a href="bioinf.html#cb49-5" aria-hidden="true" tabindex="-1"></a>https<span class="sc">:</span><span class="er">//</span>ftp.sjtu.edu.cn<span class="sc">/</span>ubuntu<span class="sc">-</span>cd<span class="sc">/</span><span class="dv">20</span>.<span class="fl">04.1</span><span class="sc">/</span>ubuntu<span class="dv">-20</span>.<span class="fl">04.1</span><span class="sc">-</span>desktop<span class="sc">-</span>amd64.iso</span>
<span id="cb49-6"><a href="bioinf.html#cb49-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-7"><a href="bioinf.html#cb49-7" aria-hidden="true" tabindex="-1"></a><span class="co">#制作USB启动盘</span></span>
<span id="cb49-8"><a href="bioinf.html#cb49-8" aria-hidden="true" tabindex="-1"></a><span class="co">#下载使用rufus https://rufus.ie/</span></span>
<span id="cb49-9"><a href="bioinf.html#cb49-9" aria-hidden="true" tabindex="-1"></a><span class="co">#或者ultraISO https://cn.ultraiso.net/</span></span>
<span id="cb49-10"><a href="bioinf.html#cb49-10" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-11"><a href="bioinf.html#cb49-11" aria-hidden="true" tabindex="-1"></a><span class="co">#挂载磁盘</span></span>
<span id="cb49-12"><a href="bioinf.html#cb49-12" aria-hidden="true" tabindex="-1"></a><span class="co">#假设未挂载磁盘为/dev/sdb</span></span>
<span id="cb49-13"><a href="bioinf.html#cb49-13" aria-hidden="true" tabindex="-1"></a>fdisk <span class="sc">-</span>l</span>
<span id="cb49-14"><a href="bioinf.html#cb49-14" aria-hidden="true" tabindex="-1"></a>parted <span class="sc">/</span>dev<span class="sc">/</span>sdb</span>
<span id="cb49-15"><a href="bioinf.html#cb49-15" aria-hidden="true" tabindex="-1"></a><span class="co">#交互界面 </span></span>
<span id="cb49-16"><a href="bioinf.html#cb49-16" aria-hidden="true" tabindex="-1"></a>mklabel gpt</span>
<span id="cb49-17"><a href="bioinf.html#cb49-17" aria-hidden="true" tabindex="-1"></a>quit</span>
<span id="cb49-18"><a href="bioinf.html#cb49-18" aria-hidden="true" tabindex="-1"></a><span class="co">#格式化磁盘</span></span>
<span id="cb49-19"><a href="bioinf.html#cb49-19" aria-hidden="true" tabindex="-1"></a>mkfs.xfs <span class="sc">-</span>f <span class="sc">/</span>dev<span class="sc">/</span>sdb </span>
<span id="cb49-20"><a href="bioinf.html#cb49-20" aria-hidden="true" tabindex="-1"></a><span class="co">#挂载磁盘</span></span>
<span id="cb49-21"><a href="bioinf.html#cb49-21" aria-hidden="true" tabindex="-1"></a>mkdir <span class="sc">/</span>ifs1</span>
<span id="cb49-22"><a href="bioinf.html#cb49-22" aria-hidden="true" tabindex="-1"></a>mount <span class="sc">/</span>dev<span class="sc">/</span>sdb <span class="sc">/</span>ifs1</span>
<span id="cb49-23"><a href="bioinf.html#cb49-23" aria-hidden="true" tabindex="-1"></a><span class="co">#修改fstab</span></span>
<span id="cb49-24"><a href="bioinf.html#cb49-24" aria-hidden="true" tabindex="-1"></a>echo <span class="st">"/dev/sdb /ifs1                       xfs     defaults,uquota        0 0"</span> <span class="sc">&gt;</span><span class="er">&gt;/</span>etc<span class="sc">/</span>fstab</span>
<span id="cb49-25"><a href="bioinf.html#cb49-25" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-26"><a href="bioinf.html#cb49-26" aria-hidden="true" tabindex="-1"></a><span class="co">#如果不安装系统，购买腾讯云服务器一年74元，2核心4G版本即可</span></span>
<span id="cb49-27"><a href="bioinf.html#cb49-27" aria-hidden="true" tabindex="-1"></a>https<span class="sc">:</span><span class="er">//</span>curl.qcloud.com<span class="sc">/</span>gm6m0QoY</span>
<span id="cb49-28"><a href="bioinf.html#cb49-28" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-29"><a href="bioinf.html#cb49-29" aria-hidden="true" tabindex="-1"></a><span class="do">#############################</span></span>
<span id="cb49-30"><a href="bioinf.html#cb49-30" aria-hidden="true" tabindex="-1"></a><span class="co">#         基本配置           #</span></span>
<span id="cb49-31"><a href="bioinf.html#cb49-31" aria-hidden="true" tabindex="-1"></a><span class="do">#############################</span></span>
<span id="cb49-32"><a href="bioinf.html#cb49-32" aria-hidden="true" tabindex="-1"></a><span class="co">#创建root账户</span></span>
<span id="cb49-33"><a href="bioinf.html#cb49-33" aria-hidden="true" tabindex="-1"></a>sudo passwd root</span>
<span id="cb49-34"><a href="bioinf.html#cb49-34" aria-hidden="true" tabindex="-1"></a>输入当前用户密码：</span>
<span id="cb49-35"><a href="bioinf.html#cb49-35" aria-hidden="true" tabindex="-1"></a>输入root密码：</span>
<span id="cb49-36"><a href="bioinf.html#cb49-36" aria-hidden="true" tabindex="-1"></a>再次输入root密码：</span>
<span id="cb49-37"><a href="bioinf.html#cb49-37" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-38"><a href="bioinf.html#cb49-38" aria-hidden="true" tabindex="-1"></a><span class="co">#以下操作使用root账户完成</span></span>
<span id="cb49-39"><a href="bioinf.html#cb49-39" aria-hidden="true" tabindex="-1"></a>su <span class="sc">-</span></span>
<span id="cb49-40"><a href="bioinf.html#cb49-40" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-41"><a href="bioinf.html#cb49-41" aria-hidden="true" tabindex="-1"></a><span class="co">#修改源</span></span>
<span id="cb49-42"><a href="bioinf.html#cb49-42" aria-hidden="true" tabindex="-1"></a>cp <span class="sc">/</span>etc<span class="sc">/</span>apt<span class="sc">/</span>sources.list <span class="sc">/</span>etc<span class="sc">/</span>apt<span class="sc">/</span>sources.list.bak</span>
<span id="cb49-43"><a href="bioinf.html#cb49-43" aria-hidden="true" tabindex="-1"></a>sed <span class="sc">-</span>i <span class="st">'s#cn.archive.ubuntu.com#mirrors.aliyun.com#g'</span> <span class="sc">/</span>etc<span class="sc">/</span>apt<span class="sc">/</span>sources.list</span>
<span id="cb49-44"><a href="bioinf.html#cb49-44" aria-hidden="true" tabindex="-1"></a>sudo apt<span class="sc">-</span>get update <span class="sc">&amp;&amp;</span> sudo apt<span class="sc">-</span>get upgrade</span>
<span id="cb49-45"><a href="bioinf.html#cb49-45" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-46"><a href="bioinf.html#cb49-46" aria-hidden="true" tabindex="-1"></a><span class="co">#ssh登录</span></span>
<span id="cb49-47"><a href="bioinf.html#cb49-47" aria-hidden="true" tabindex="-1"></a>apt install openssh<span class="sc">-</span>server</span>
<span id="cb49-48"><a href="bioinf.html#cb49-48" aria-hidden="true" tabindex="-1"></a>ps <span class="sc">-</span>e <span class="sc">|</span>  grep ssh   <span class="co">#检查ssh server是否启动</span></span>
<span id="cb49-49"><a href="bioinf.html#cb49-49" aria-hidden="true" tabindex="-1"></a>sudo <span class="sc">/</span>etc<span class="sc">/</span>init.d<span class="sc">/</span>ssh start  <span class="co">#启动</span></span>
<span id="cb49-50"><a href="bioinf.html#cb49-50" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-51"><a href="bioinf.html#cb49-51" aria-hidden="true" tabindex="-1"></a><span class="co">#安装java</span></span>
<span id="cb49-52"><a href="bioinf.html#cb49-52" aria-hidden="true" tabindex="-1"></a>apt<span class="sc">-</span>get install openjdk<span class="dv">-8</span><span class="sc">-</span>jdk</span>
<span id="cb49-53"><a href="bioinf.html#cb49-53" aria-hidden="true" tabindex="-1"></a>sudo add<span class="sc">-</span>apt<span class="sc">-</span>repository ppa<span class="sc">:</span>webupd8team<span class="sc">/</span>java</span>
<span id="cb49-54"><a href="bioinf.html#cb49-54" aria-hidden="true" tabindex="-1"></a>apt update</span>
<span id="cb49-55"><a href="bioinf.html#cb49-55" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y oracle<span class="sc">-</span>java8<span class="sc">-</span>installer</span>
<span id="cb49-56"><a href="bioinf.html#cb49-56" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y zlib1g zlib1g.dev</span>
<span id="cb49-57"><a href="bioinf.html#cb49-57" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y libboost<span class="sc">-</span>dev</span>
<span id="cb49-58"><a href="bioinf.html#cb49-58" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-59"><a href="bioinf.html#cb49-59" aria-hidden="true" tabindex="-1"></a><span class="do">#############################</span></span>
<span id="cb49-60"><a href="bioinf.html#cb49-60" aria-hidden="true" tabindex="-1"></a><span class="co">#        安装R以及Rstudio    #</span></span>
<span id="cb49-61"><a href="bioinf.html#cb49-61" aria-hidden="true" tabindex="-1"></a><span class="do">#############################</span></span>
<span id="cb49-62"><a href="bioinf.html#cb49-62" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y r<span class="sc">-</span>base</span>
<span id="cb49-63"><a href="bioinf.html#cb49-63" aria-hidden="true" tabindex="-1"></a>https<span class="sc">:</span><span class="er">//</span>download1.rstudio.org<span class="sc">/</span>desktop<span class="sc">/</span>bionic<span class="sc">/</span>amd64<span class="sc">/</span>rstudio<span class="dv">-1</span>.<span class="fl">3.1093</span><span class="sc">-</span>amd64.deb</span>
<span id="cb49-64"><a href="bioinf.html#cb49-64" aria-hidden="true" tabindex="-1"></a>dpkg <span class="sc">-</span>i rstudio<span class="dv">-1</span>.<span class="fl">3.1093</span><span class="sc">-</span>amd64.deb</span>
<span id="cb49-65"><a href="bioinf.html#cb49-65" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-66"><a href="bioinf.html#cb49-66" aria-hidden="true" tabindex="-1"></a><span class="co">#安装一些小工具</span></span>
<span id="cb49-67"><a href="bioinf.html#cb49-67" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y git vim tree creen htop cmake lftp lrzsz</span>
<span id="cb49-68"><a href="bioinf.html#cb49-68" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-69"><a href="bioinf.html#cb49-69" aria-hidden="true" tabindex="-1"></a><span class="co">#apt安装生物软件</span></span>
<span id="cb49-70"><a href="bioinf.html#cb49-70" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y bwa</span>
<span id="cb49-71"><a href="bioinf.html#cb49-71" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y samtools </span>
<span id="cb49-72"><a href="bioinf.html#cb49-72" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y bcftools</span>
<span id="cb49-73"><a href="bioinf.html#cb49-73" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y blast2</span>
<span id="cb49-74"><a href="bioinf.html#cb49-74" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y bedtools</span>
<span id="cb49-75"><a href="bioinf.html#cb49-75" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y seqtk</span>
<span id="cb49-76"><a href="bioinf.html#cb49-76" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y minimap2</span>
<span id="cb49-77"><a href="bioinf.html#cb49-77" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y bowtie2</span>
<span id="cb49-78"><a href="bioinf.html#cb49-78" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y phylip</span>
<span id="cb49-79"><a href="bioinf.html#cb49-79" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y clustalx</span>
<span id="cb49-80"><a href="bioinf.html#cb49-80" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y canu</span>
<span id="cb49-81"><a href="bioinf.html#cb49-81" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y kraken2</span>
<span id="cb49-82"><a href="bioinf.html#cb49-82" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y hisat2</span>
<span id="cb49-83"><a href="bioinf.html#cb49-83" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y stringtie</span>
<span id="cb49-84"><a href="bioinf.html#cb49-84" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y jellyfish</span>
<span id="cb49-85"><a href="bioinf.html#cb49-85" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y circos</span>
<span id="cb49-86"><a href="bioinf.html#cb49-86" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y nanopolish</span>
<span id="cb49-87"><a href="bioinf.html#cb49-87" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y nanook</span>
<span id="cb49-88"><a href="bioinf.html#cb49-88" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y centrifuge</span>
<span id="cb49-89"><a href="bioinf.html#cb49-89" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y rna<span class="sc">-</span>star</span>
<span id="cb49-90"><a href="bioinf.html#cb49-90" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y freebayes</span>
<span id="cb49-91"><a href="bioinf.html#cb49-91" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y cnvkit</span>
<span id="cb49-92"><a href="bioinf.html#cb49-92" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y spades</span>
<span id="cb49-93"><a href="bioinf.html#cb49-93" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y mothur</span>
<span id="cb49-94"><a href="bioinf.html#cb49-94" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y muscle</span>
<span id="cb49-95"><a href="bioinf.html#cb49-95" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y mafft</span>
<span id="cb49-96"><a href="bioinf.html#cb49-96" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y iqtree</span>
<span id="cb49-97"><a href="bioinf.html#cb49-97" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y sniffles</span>
<span id="cb49-98"><a href="bioinf.html#cb49-98" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y last<span class="sc">-</span>align</span>
<span id="cb49-99"><a href="bioinf.html#cb49-99" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y augustus</span>
<span id="cb49-100"><a href="bioinf.html#cb49-100" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y bamtools </span>
<span id="cb49-101"><a href="bioinf.html#cb49-101" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y bedops</span>
<span id="cb49-102"><a href="bioinf.html#cb49-102" aria-hidden="true" tabindex="-1"></a>apt install <span class="sc">-</span>y delly</span>
<span id="cb49-103"><a href="bioinf.html#cb49-103" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-104"><a href="bioinf.html#cb49-104" aria-hidden="true" tabindex="-1"></a><span class="co">#安装浏览器</span></span>
<span id="cb49-105"><a href="bioinf.html#cb49-105" aria-hidden="true" tabindex="-1"></a>apt<span class="sc">-</span>get install <span class="sc">-</span>y chromium<span class="sc">-</span>browser</span>
<span id="cb49-106"><a href="bioinf.html#cb49-106" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-107"><a href="bioinf.html#cb49-107" aria-hidden="true" tabindex="-1"></a><span class="co">#安装微信</span></span>
<span id="cb49-108"><a href="bioinf.html#cb49-108" aria-hidden="true" tabindex="-1"></a>wget https<span class="sc">:</span><span class="er">//</span>www.ubuntukylin.com<span class="sc">/</span>public<span class="sc">/</span>pdf<span class="sc">/</span>wine<span class="sc">-</span>wechat_1<span class="fl">.0</span><span class="sc">-</span>windows2.<span class="fl">8.6</span>_all.deb</span>
<span id="cb49-109"><a href="bioinf.html#cb49-109" aria-hidden="true" tabindex="-1"></a><span class="co">#Debian 系的操作系统可以执行这样的命令：</span></span>
<span id="cb49-110"><a href="bioinf.html#cb49-110" aria-hidden="true" tabindex="-1"></a>sudo dpkg <span class="sc">--</span>add<span class="sc">-</span>architecture i386</span>
<span id="cb49-111"><a href="bioinf.html#cb49-111" aria-hidden="true" tabindex="-1"></a>sudo apt update</span>
<span id="cb49-112"><a href="bioinf.html#cb49-112" aria-hidden="true" tabindex="-1"></a><span class="co">#安装 wine 应用所需的依赖，也就是 wine：</span></span>
<span id="cb49-113"><a href="bioinf.html#cb49-113" aria-hidden="true" tabindex="-1"></a>sudo apt install wine<span class="sc">-</span>stable</span>
<span id="cb49-114"><a href="bioinf.html#cb49-114" aria-hidden="true" tabindex="-1"></a><span class="co">#使用 dpkg 安装 wine 应用：</span></span>
<span id="cb49-115"><a href="bioinf.html#cb49-115" aria-hidden="true" tabindex="-1"></a>sudo dpkg <span class="sc">-</span>i wine<span class="sc">-</span>wechat_1<span class="fl">.0</span><span class="sc">-</span>windows2.<span class="fl">8.6</span>_all.deb</span>
<span id="cb49-116"><a href="bioinf.html#cb49-116" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-117"><a href="bioinf.html#cb49-117" aria-hidden="true" tabindex="-1"></a><span class="do">#############################</span></span>
<span id="cb49-118"><a href="bioinf.html#cb49-118" aria-hidden="true" tabindex="-1"></a><span class="co">#       安装bioconda         #</span></span>
<span id="cb49-119"><a href="bioinf.html#cb49-119" aria-hidden="true" tabindex="-1"></a><span class="do">#############################</span></span>
<span id="cb49-120"><a href="bioinf.html#cb49-120" aria-hidden="true" tabindex="-1"></a>wget https<span class="sc">:</span><span class="er">//</span>repo.continuum.io<span class="sc">/</span>miniconda<span class="sc">/</span>Miniconda3<span class="sc">-</span>latest<span class="sc">-</span>Linux<span class="sc">-</span>x86_64.sh  </span>
<span id="cb49-121"><a href="bioinf.html#cb49-121" aria-hidden="true" tabindex="-1"></a>sh Miniconda3<span class="sc">-</span>latest<span class="sc">-</span>Linux<span class="sc">-</span>x86_64.sh  </span>
<span id="cb49-122"><a href="bioinf.html#cb49-122" aria-hidden="true" tabindex="-1"></a>source <span class="sc">~</span><span class="er">/</span>.bashrc</span>
<span id="cb49-123"><a href="bioinf.html#cb49-123" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-124"><a href="bioinf.html#cb49-124" aria-hidden="true" tabindex="-1"></a><span class="co">#添加软件源</span></span>
<span id="cb49-125"><a href="bioinf.html#cb49-125" aria-hidden="true" tabindex="-1"></a>conda config <span class="sc">--</span>add channels bioconda </span>
<span id="cb49-126"><a href="bioinf.html#cb49-126" aria-hidden="true" tabindex="-1"></a>conda config <span class="sc">--</span>add channels conda<span class="sc">-</span>forge</span>
<span id="cb49-127"><a href="bioinf.html#cb49-127" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-128"><a href="bioinf.html#cb49-128" aria-hidden="true" tabindex="-1"></a><span class="do">#############################</span></span>
<span id="cb49-129"><a href="bioinf.html#cb49-129" aria-hidden="true" tabindex="-1"></a><span class="co"># 使用bioconda安装常用软件   #</span></span>
<span id="cb49-130"><a href="bioinf.html#cb49-130" aria-hidden="true" tabindex="-1"></a><span class="do">#############################</span></span>
<span id="cb49-131"><a href="bioinf.html#cb49-131" aria-hidden="true" tabindex="-1"></a><span class="co">#安装mamba</span></span>
<span id="cb49-132"><a href="bioinf.html#cb49-132" aria-hidden="true" tabindex="-1"></a>conda install <span class="sc">-</span>c conda<span class="sc">-</span>forge <span class="sc">-</span>y mamba</span>
<span id="cb49-133"><a href="bioinf.html#cb49-133" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-134"><a href="bioinf.html#cb49-134" aria-hidden="true" tabindex="-1"></a><span class="co">#利用mamba安装软件</span></span>
<span id="cb49-135"><a href="bioinf.html#cb49-135" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y bwa </span>
<span id="cb49-136"><a href="bioinf.html#cb49-136" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y samtools</span>
<span id="cb49-137"><a href="bioinf.html#cb49-137" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y bcftools</span>
<span id="cb49-138"><a href="bioinf.html#cb49-138" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y blast </span>
<span id="cb49-139"><a href="bioinf.html#cb49-139" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y blat </span>
<span id="cb49-140"><a href="bioinf.html#cb49-140" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y mummer </span>
<span id="cb49-141"><a href="bioinf.html#cb49-141" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y mafft </span>
<span id="cb49-142"><a href="bioinf.html#cb49-142" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y muscle </span>
<span id="cb49-143"><a href="bioinf.html#cb49-143" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y lastz</span>
<span id="cb49-144"><a href="bioinf.html#cb49-144" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y sra<span class="sc">-</span>tools</span>
<span id="cb49-145"><a href="bioinf.html#cb49-145" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y seqkit</span>
<span id="cb49-146"><a href="bioinf.html#cb49-146" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y seqtk</span>
<span id="cb49-147"><a href="bioinf.html#cb49-147" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y bedtools</span>
<span id="cb49-148"><a href="bioinf.html#cb49-148" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y bedops</span>
<span id="cb49-149"><a href="bioinf.html#cb49-149" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y gfatools</span>
<span id="cb49-150"><a href="bioinf.html#cb49-150" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y circos</span>
<span id="cb49-151"><a href="bioinf.html#cb49-151" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y entrez<span class="sc">-</span>direct</span>
<span id="cb49-152"><a href="bioinf.html#cb49-152" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y emboss</span>
<span id="cb49-153"><a href="bioinf.html#cb49-153" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-154"><a href="bioinf.html#cb49-154" aria-hidden="true" tabindex="-1"></a><span class="co">#安装数据质控软件</span></span>
<span id="cb49-155"><a href="bioinf.html#cb49-155" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y fastqc multiqc </span>
<span id="cb49-156"><a href="bioinf.html#cb49-156" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y trimmomatic</span>
<span id="cb49-157"><a href="bioinf.html#cb49-157" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y fastp</span>
<span id="cb49-158"><a href="bioinf.html#cb49-158" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-159"><a href="bioinf.html#cb49-159" aria-hidden="true" tabindex="-1"></a><span class="co">#安装基因组拼接相关工具</span></span>
<span id="cb49-160"><a href="bioinf.html#cb49-160" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y velvet</span>
<span id="cb49-161"><a href="bioinf.html#cb49-161" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y flye</span>
<span id="cb49-162"><a href="bioinf.html#cb49-162" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y miniasm</span>
<span id="cb49-163"><a href="bioinf.html#cb49-163" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y canu</span>
<span id="cb49-164"><a href="bioinf.html#cb49-164" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y megahit</span>
<span id="cb49-165"><a href="bioinf.html#cb49-165" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y spades</span>
<span id="cb49-166"><a href="bioinf.html#cb49-166" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y quast</span>
<span id="cb49-167"><a href="bioinf.html#cb49-167" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y racon</span>
<span id="cb49-168"><a href="bioinf.html#cb49-168" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y miniasm</span>
<span id="cb49-169"><a href="bioinf.html#cb49-169" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y nanopolish</span>
<span id="cb49-170"><a href="bioinf.html#cb49-170" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-171"><a href="bioinf.html#cb49-171" aria-hidden="true" tabindex="-1"></a><span class="co">#安装基因功能分析软件</span></span>
<span id="cb49-172"><a href="bioinf.html#cb49-172" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y prodigal</span>
<span id="cb49-173"><a href="bioinf.html#cb49-173" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y glimmer</span>
<span id="cb49-174"><a href="bioinf.html#cb49-174" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y augustus</span>
<span id="cb49-175"><a href="bioinf.html#cb49-175" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y trf</span>
<span id="cb49-176"><a href="bioinf.html#cb49-176" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-177"><a href="bioinf.html#cb49-177" aria-hidden="true" tabindex="-1"></a><span class="do">#############################</span></span>
<span id="cb49-178"><a href="bioinf.html#cb49-178" aria-hidden="true" tabindex="-1"></a><span class="co">#      使用虚拟环境             #</span></span>
<span id="cb49-179"><a href="bioinf.html#cb49-179" aria-hidden="true" tabindex="-1"></a><span class="do">#############################</span></span>
<span id="cb49-180"><a href="bioinf.html#cb49-180" aria-hidden="true" tabindex="-1"></a><span class="co">#1 创建python 2.7环境</span></span>
<span id="cb49-181"><a href="bioinf.html#cb49-181" aria-hidden="true" tabindex="-1"></a>conda create <span class="sc">-</span>n py27 <span class="sc">-</span>y python<span class="ot">=</span><span class="fl">2.7</span></span>
<span id="cb49-182"><a href="bioinf.html#cb49-182" aria-hidden="true" tabindex="-1"></a><span class="co">#查看现有虚拟环境</span></span>
<span id="cb49-183"><a href="bioinf.html#cb49-183" aria-hidden="true" tabindex="-1"></a>conda env list</span>
<span id="cb49-184"><a href="bioinf.html#cb49-184" aria-hidden="true" tabindex="-1"></a><span class="co">#激活python2.7环境</span></span>
<span id="cb49-185"><a href="bioinf.html#cb49-185" aria-hidden="true" tabindex="-1"></a>conda activate py27</span>
<span id="cb49-186"><a href="bioinf.html#cb49-186" aria-hidden="true" tabindex="-1"></a><span class="co">#查看python版本</span></span>
<span id="cb49-187"><a href="bioinf.html#cb49-187" aria-hidden="true" tabindex="-1"></a>python <span class="sc">-</span>V</span>
<span id="cb49-188"><a href="bioinf.html#cb49-188" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-189"><a href="bioinf.html#cb49-189" aria-hidden="true" tabindex="-1"></a><span class="co">#2 安装nanoplot</span></span>
<span id="cb49-190"><a href="bioinf.html#cb49-190" aria-hidden="true" tabindex="-1"></a>conda create <span class="sc">-</span>n nanoplot <span class="sc">-</span>y nanoplot</span>
<span id="cb49-191"><a href="bioinf.html#cb49-191" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-192"><a href="bioinf.html#cb49-192" aria-hidden="true" tabindex="-1"></a><span class="co">#3 bioconda管理R及R包</span></span>
<span id="cb49-193"><a href="bioinf.html#cb49-193" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y r<span class="sc">-</span>base<span class="ot">=</span><span class="dv">4</span>.<span class="fl">1.1</span></span>
<span id="cb49-194"><a href="bioinf.html#cb49-194" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y bioconductor<span class="sc">-</span>deseq2</span>
<span id="cb49-195"><a href="bioinf.html#cb49-195" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y bioconductor<span class="sc">-</span>rnaseqgene</span>
<span id="cb49-196"><a href="bioinf.html#cb49-196" aria-hidden="true" tabindex="-1"></a>mamba install <span class="sc">-</span>y bioconductor<span class="sc">-</span>clusterProfiler</span></code></pre></div>

</div>
</div>
</div>
  <div class="chapter-nav">
<div class="prev"><a href="python.html"><span class="header-section-number">2</span> Python知识汇总</a></div>
<div class="next"><a href="literature.html"><span class="header-section-number">4</span> 嗑盐文献</a></div>
</div></main><div class="col-md-3 col-lg-2 d-none d-md-block sidebar sidebar-chapter">
    <nav id="toc" data-toggle="toc" aria-label="On this page"><h2>On this page</h2>
      <ul class="nav navbar-nav">
<li><a class="nav-link" href="#bioinf"><span class="header-section-number">3</span> 生物信息学</a></li>
<li><a class="nav-link" href="#%E6%9C%AC%E7%AB%A0%E5%89%8D%E8%A8%80-2"><span class="header-section-number">3.1</span> 本章前言</a></li>
<li>
<a class="nav-link" href="#%E5%B8%B8%E7%94%A8%E7%9A%84%E7%94%9F%E7%89%A9%E5%AD%A6%E6%95%B0%E6%8D%AE%E5%BA%93"><span class="header-section-number">3.2</span> 常用的生物学数据库</a><ul class="nav navbar-nav"><li><a class="nav-link" href="#cath-gene3d"><span class="header-section-number">3.2.1</span> CATH-Gene3D</a></li></ul>
</li>
<li>
<a class="nav-link" href="#WSL4Docker"><span class="header-section-number">3.3</span> WSL安装使用Docker</a><ul class="nav navbar-nav">
<li><a class="nav-link" href="#docker%E7%9A%84%E5%AE%89%E8%A3%85"><span class="header-section-number">3.3.1</span> Docker的安装</a></li>
<li><a class="nav-link" href="#docker%E7%9A%84%E4%BD%BF%E7%94%A8"><span class="header-section-number">3.3.2</span> Docker的使用</a></li>
<li><a class="nav-link" href="#%E5%A6%82%E4%BD%95%E4%BB%8Ewsl1%E5%88%87%E6%8D%A2%E5%88%B0wsl2"><span class="header-section-number">3.3.3</span> 如何从WSL1切换到WSL2</a></li>
<li><a class="nav-link" href="#%E4%B8%8B%E8%BD%BDdocker%E9%95%9C%E5%83%8F"><span class="header-section-number">3.3.4</span> 下载Docker镜像</a></li>
<li><a class="nav-link" href="#docker%E7%9A%84%E4%BD%BF%E7%94%A8-1"><span class="header-section-number">3.3.5</span> Docker的使用</a></li>
<li><a class="nav-link" href="#%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E9%95%9C%E5%83%8F"><span class="header-section-number">3.3.6</span> 如何创建自己的镜像</a></li>
</ul>
</li>
<li>
<a class="nav-link" href="#conda%E7%9A%84%E5%AE%89%E8%A3%85%E4%BD%BF%E7%94%A8"><span class="header-section-number">3.4</span> Conda的安装使用</a><ul class="nav navbar-nav">
<li><a class="nav-link" href="#%E4%B8%8B%E8%BD%BD%E5%AE%89%E8%A3%85"><span class="header-section-number">3.4.1</span> 下载安装</a></li>
<li><a class="nav-link" href="#conda%E5%AE%89%E8%A3%85r%E5%8F%8Ar%E5%8C%85"><span class="header-section-number">3.4.2</span> Conda安装R及R包</a></li>
<li><a class="nav-link" href="#%E5%AE%89%E8%A3%85%E5%85%B6%E4%BB%96%E8%BD%AF%E4%BB%B6"><span class="header-section-number">3.4.3</span> 安装其他软件</a></li>
<li><a class="nav-link" href="#pip%E4%B8%8B%E8%BD%BD%E9%80%9F%E5%BA%A6%E6%85%A2%E7%9A%84%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%95"><span class="header-section-number">3.4.4</span> pip下载速度慢的解决方法：</a></li>
</ul>
</li>
<li>
<a class="nav-link" href="#git%E7%9A%84%E4%BD%BF%E7%94%A8"><span class="header-section-number">3.5</span> git的使用</a><ul class="nav navbar-nav"><li><a class="nav-link" href="#git%E5%90%8C%E6%97%B6%E7%AE%A1%E7%90%86github%E4%B8%8Egitee"><span class="header-section-number">3.5.1</span> git同时管理GitHub与Gitee</a></li></ul>
</li>
<li>
<a class="nav-link" href="#%E5%9F%BA%E5%9B%A0%E5%AE%B6%E6%97%8F%E5%88%86%E6%9E%90"><span class="header-section-number">3.6</span> 基因家族分析</a><ul class="nav navbar-nav">
<li><a class="nav-link" href="#%E5%9F%BA%E5%9B%A0%E5%AE%B6%E6%97%8F%E5%88%86%E6%9E%90%E6%80%9D%E8%B7%AF%E5%8F%8A%E6%96%87%E7%AB%A0%E6%92%B0%E5%86%99%E6%80%9D%E8%B7%AF"><span class="header-section-number">3.6.1</span> 基因家族分析思路及文章撰写思路</a></li>
<li><a class="nav-link" href="#%E6%95%B0%E6%8D%AE%E5%87%86%E5%A4%87"><span class="header-section-number">3.6.2</span> 数据准备</a></li>
<li><a class="nav-link" href="#%E8%BD%AF%E4%BB%B6%E5%87%86%E5%A4%87"><span class="header-section-number">3.6.3</span> 软件准备</a></li>
<li><a class="nav-link" href="#%E5%88%86%E6%9E%90%E8%BF%87%E7%A8%8B"><span class="header-section-number">3.6.4</span> 分析过程</a></li>
</ul>
</li>
<li><a class="nav-link" href="#fasttree%E6%9E%84%E5%BB%BA%E8%BF%9B%E5%8C%96%E6%A0%91"><span class="header-section-number">3.7</span> FastTree构建进化树</a></li>
<li>
<a class="nav-link" href="#%E5%A4%84%E7%90%86planttfdb%E4%B8%8B%E8%BD%BD%E7%9A%84fasta%E6%A0%BC%E5%BC%8F%E5%BA%8F%E5%88%97"><span class="header-section-number">3.8</span> 处理PlantTFDB下载的fasta格式序列</a><ul class="nav navbar-nav">
<li><a class="nav-link" href="#%E5%B0%86%E5%BA%8F%E5%88%97id%E5%92%8C%E7%89%A9%E7%A7%8D%E4%BF%A1%E6%81%AF%E8%BF%9B%E8%A1%8C%E6%8F%90%E5%8F%96"><span class="header-section-number">3.8.1</span> 将序列ID和物种信息进行提取</a></li>
<li><a class="nav-link" href="#%E5%B0%86fasta%E6%A0%BC%E5%BC%8F%E7%9A%84%E5%BA%8F%E5%88%97%E8%BD%AC%E6%8D%A2%E6%88%90data.frame%E6%A0%BC%E5%BC%8F"><span class="header-section-number">3.8.2</span> 将fasta格式的序列转换成data.frame格式</a></li>
</ul>
</li>
<li>
<a class="nav-link" href="#%E8%BD%AF%E4%BB%B6%E5%AE%89%E8%A3%85"><span class="header-section-number">3.9</span> 软件安装</a><ul class="nav navbar-nav"><li><a class="nav-link" href="#aspera"><span class="header-section-number">3.9.1</span> Aspera</a></li></ul>
</li>
<li>
<a class="nav-link" href="#ubuntu%E6%90%AD%E5%BB%BA%E7%94%9F%E4%BF%A1%E7%8E%AF%E5%A2%83"><span class="header-section-number">3.10</span> Ubuntu搭建生信环境</a><ul class="nav navbar-nav">
<li><a class="nav-link" href="#%E6%97%A7%E7%89%88%E6%9C%AC"><span class="header-section-number">3.10.1</span> 旧版本</a></li>
<li><a class="nav-link" href="#%E6%96%B0%E7%89%88%E6%9C%AC"><span class="header-section-number">3.10.2</span> 新版本</a></li>
</ul>
</li>
</ul>

      <div class="book-extra">
        <ul class="list-unstyled">
<li><a id="book-source" href="https://github.com/lixiang117423/lixiang117423.github.io/blob/master/003-%E7%94%9F%E7%89%A9%E4%BF%A1%E6%81%AF%E5%AD%A6.Rmd">View source <i class="fab fa-github"></i></a></li>
          <li><a id="book-edit" href="https://github.com/lixiang117423/lixiang117423.github.io/edit/master/003-%E7%94%9F%E7%89%A9%E4%BF%A1%E6%81%AF%E5%AD%A6.Rmd">Edit this page <i class="fab fa-github"></i></a></li>
        </ul>
</div>
    </nav>
</div>

</div>
</div> <!-- .container -->

<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

  <div class="col-12 col-md-6 mt-3">
    <p>"<strong>小蓝哥的知识荒原</strong>" was written by 李详. It was last built on 2021年10月1日.</p>
  </div>

  <div class="col-12 col-md-6 mt-3">
    <p>This book was built by the <a class="text-light" href="https://bookdown.org">bookdown</a> R package.</p>
  </div>

</div></div>
</footer><!-- dynamically load mathjax for compatibility with self-contained --><script>
  (function () {
    var script = document.createElement("script");
    script.type = "text/javascript";
    var src = "true";
    if (src === "" || src === "true") src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-MML-AM_CHTML";
    if (location.protocol !== "file:")
      if (/^https?:/.test(src))
        src = src.replace(/^https?:/, '');
    script.src = src;
    document.getElementsByTagName("head")[0].appendChild(script);
  })();
</script>
</body>
</html>
